I am trying to display a table with a column named “Version”, as in a software version number. It displays the column but all the entries are blank. I can reproduce simply by taking the sample code I found in the docs and changing ‘Protein’ to ‘Version’, like this:
I also found a similar bug, but I’m not sure if this one can be worked around or not in UD.
I’m using the Servicenow API to pull data in, one of the features of that API is dot walking across tables.
The problem is, the resulting variable name, might be something like ‘location.country’ as a string, rather than object / property as you’d expect in powershell.
Addressing this in code, I’ll usually do something like $object.“location.country”.
I’ve found that introducing variable names like this, will prevent any data from being returned.
As a workaround, I manipulate the data and variables names first, removing the dot, and then passing into Out-UDTableData, but because this is a dynamic/server-side table, I’m having to then also manipulate filters, search and sorting so that those variable names are converted back before passing back to the servicenow API.
The workaround is not an issue really, it’s just something to be aware of, but it would be cool if there was a way to handle this in UD automatically.
(Latest version of Universal & UD)
Thanks, Adam. For the time being, I worked around the issue in my dashboard by piping the objects from my data source through Select-Object and changing the name of the property to ‘CurrentVersion’. Then I used New-UDTableColumn to define columns for the table, and set the Title for the CurrentVersion property to ‘Version’. So for the user, it still looks like ‘Version’.
I’ll be glad to remove that ugliness when you get it fixed, though.