Hi all,
Vscode.UDStudio is giving an error “You cannot call a method on a null-valued expression.” and is not showing my scheduled endpoints correctly even though I’d given all components with endpoints an ID
$Schedule5 = New-UDEndpointSchedule -Every 5 -Minute
$Schedule2 = New-UDEndpointSchedule -Every 2 -Minute
$endpoint1 = New-UDEndpoint -Schedule $Schedule5 -Id 'endpoint1' -Endpoint {
$Cache:oldesttickets = get-oldesttickets
$Cache:summarytable = get-summarytable
$Cache:totaltickets = get-totaltickets
$Cache:totalticketsbystatus = get-totalticketsbystatus
$Cache:responsesla = get-responsesla
$Cache:resolutionsla = get-resolutionsla
$Cache:responsesoonfail = get-responsesoonfail
$Cache:resolutionsoonfail = get-resolutionsoonfail
}
$endpoint2 = New-UDEndpoint -Schedule $Schedule2 -Id 'endpoint2' -Endpoint {
Sync-UDElement -id 'responsesla' -Broadcast
Sync-UDElement -id 'resolutionsla' -Broadcast
Sync-UDElement -id 'Total' -Broadcast
Sync-UDElement -id 'Totalheading' -Broadcast
}
$endpoint = $endpoint1, $endpoint2
Start-UDDashboard -Port $ConfigurationFile.dashboard.port -Dashboard $MyDashboard -Name $ConfigurationFile.dashboard.title -Force -Endpoint $endpoint -AutoReload
I am also getting errors
17:17:52 [Warn] ComponentController Endpoint Total not found
17:17:52 [Warn] ComponentController Endpoint Totalheading not found.
but I’ve given them Id’s?
New-UDStyle -id 'Totalstyle' -Style '
.card .card-content {
font-size = 40px }' -Content {
New-UDCard -ID 'Total' -TextAlignment center -Endpoint {
#New-UDIcon -Size 3x -Icon 'hands_helping' -Style @{color = '#fff' } -Id 'hands'
New-UDHeading -id 'Totalheading' -Size 1 -Text "Open Calls: $($Cache:totaltickets.column1)" -Color white
New-UDHtml -Markup "<br></br>"
}
}
Does anyone have any ideas?