I have UDCircles within collapsible items that do not seem to be refreshing. I don’t see ‘AutoRefresh’ or ‘RefreshInterval’ parameters available for the New-UDCircle cmdlet. Additionally, when I attempt to put -autorefresh or -refreshinterval at the end of New-UDCollapsibleItem, I get ’Exception calling “Invoke” with “0” argument(s): “Parameter set cannot be resolved using the specified named parameters.”'
Is there something I’m missing? Relevant code snippet:
New-UDCollapsible -BackgroundColor "#232323" -items {
New-UDCollapsibleItem -BackgroundColor "#232323" -FontColor "#000000" -title "$($type.department)" -icon arrow_circle_down -content {
#Split collection into 3 collections for column placement
$arr = $type.members
$i=0;$j=0
$c1 = @();$c2 = @();$c3 = @()
foreach($e in $type.members)
{
if($i -eq 0){$c1 += $arr[$j]}
if($i -eq 1){$c2 += $arr[$j]}
if($i -eq 2){$c3 += $arr[$j]}
$i++
if($i -eq 3){$i=0}
$j++
}
New-UDRow -columns {
#C1
New-UDColumn -size 4 -content {
foreach($member in $c1)
{
$membername = $member.member.firstname + " " + $member.member.lastname
New-UDHeading -size 4 -color $etsBlue -text "$membername"
$memberid = $member.member.memberid
$pct = (($member.utilization.hoursScheduled/8)*100)
if($pct -gt 100){$pct = 100}
if($pct -gt 75){$progressColor = "red"}
if($pct -ge 50 -AND $pct -le 75) {$progressColor = "Blue"}
if($pct -lt 50){$progressColor = "Green"}
New-UDHeading -text "Recorded hours: $($member.utilization.hoursEntered)" -size 6 -color "White"
New-UDHeading -text "Scheduled hours: $($member.utilization.hoursScheduled)" -size 6 -Color "White"
New-UDCircle -progress $pct -responsive $false -size 180 -linewidth 22 -progressColor $progressColor -textcolor "white"
}
}
#C2
New-UDColumn -size 4 -content {
foreach($member in $c2)
{
$membername = $member.member.firstname + " " + $member.member.lastname
New-UDHeading -size 4 -color $etsBlue -text "$membername"
$memberid = $member.member.memberid
$pct = (($member.utilization.hoursScheduled/8)*100)
if($pct -gt 100){$pct = 100}
if($pct -gt 75){$progressColor = "red"}
if($pct -ge 50 -AND $pct -le 75) {$progressColor = "Blue"}
if($pct -lt 50){$progressColor = "Green"}
New-UDHeading -text "Recorded hours: $($member.utilization.hoursEntered)" -size 6 -color "White"
New-UDHeading -text "Scheduled hours: $($member.utilization.hoursScheduled)" -size 6 -Color "White"
New-UDCircle -progress $pct -responsive $false -size 180 -linewidth 22 -progressColor $progressColor -textcolor "white"
}
}
#C3
New-UDColumn -size 4 -content {
foreach($member in $c3)
{
$membername = $member.member.firstname + " " + $member.member.lastname
New-UDHeading -size 4 -color $etsBlue -text "$membername"
$memberid = $member.member.memberid
$pct = (($member.utilization.hoursScheduled/8)*100)
if($pct -gt 100){$pct = 100}
if($pct -gt 75){$progressColor = "red"}
if($pct -ge 50 -AND $pct -le 75) {$progressColor = "Blue"}
if($pct -lt 50){$progressColor = "Green"}
New-UDHeading -text "Recorded hours: $($member.utilization.hoursEntered)" -size 6 -color "White"
New-UDHeading -text "Scheduled hours: $($member.utilization.hoursScheduled)" -size 6 -Color "White"
New-UDCircle -progress $pct -responsive $false -size 180 -linewidth 22 -progressColor $progressColor -textcolor "white"
}
}
}
}
}