Product: PowerShell Universal
Version: 2.10.2
Seeing results similar to this
I have a fairly basic page that pops this error up
Here is the stack trace
May 27, 2022 10:07 AM An error occurred: The term 'New-Guid' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Endpoint: Table
Session: 912c9e55-d0d0-4836-9c2e-d52795ef68f7, User: evanhalen
Stack Trace:
- The term 'New-Guid' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. at Table:54
- Table:34
- a3e0c4a9-814f-49c1-9833-1d5f2dc50a10:12
Here is the full page.
$session:query = ""
$DB = "PATH TO\db.sqlite"
New-UDTextbox -id "LastName" -Label "Last Name"
New-UDButton -Variant contained -Text "Search" -Icon (New-UDIcon -Icon search) -onclick {
$user = (Get-UDElement -id "LastName").value
$session:query = "select * from StudentLogin where LastName like '$user%'"
Sync-UDElement -id "Table"
}
$columns = @(
COLUMNS CREATED HERE
)
New-UDDynamic -id "Table" -Content {
$data = Invoke-SqliteQuery -datasource $db -query $session:query
if ($data.count -gt 50){
$tablesize = 50
}
else{
$tablesize = $data.count
}
New-UDTable -Data $data -Columns $columns -PageSize $tablesize -StickyHeader -ShowSearch -ShowPagination
} -LoadingComponent {
New-UDProgress -Circular
}
The error shows up every time the table it reloaded, regardless of having $data populated or not. It doesn’t actually seem to affect the page function at all. Adding the function for New-GUID in the old forum post does fix the issue.
Side note to this, I added -DisableErrorToast to the New-PSUDashboard in dashboards.ps1 and the errors still show up.