https://docs.ironmansoftware.com/dashboard/components/data-display/table
Per the above documentation
|Columns|Hashtable|Defines the columns to show within the table. Use New-UDTableColumn to define these columns. If this parameter isn’t specified, the properties of the data that you pass in will become the columns.|false
It seems I should be able to make a New-UDTable without specifying the columns.
The code example below works if I specify columns, however this is undesirable as any changes would mean i’d be updating the function that outputs the data as well as the code that displays the table.
If I dont specify the columns i get:
[2020-09-16T17:24:32.5457445Z] PS: Cannot process command because of one or more missing mandatory parameters: Columns.
New-UDDashboard -Title "TableTest" -Content {
New-UDTable -Title 'Shows' -LoadData {
Wait-Debugger
$TableData = ConvertFrom-Json $Body
$Data = Get-AzureADB2Users
$Data | Out-UDTableData -Page $TableData.page -TotalCount $Data.Count -Properties $TableData.properties
}
}