PSU 4.2.12 docker issue with table data

Product: PowerShell Universal
Version: 4.2.12
Docker version

Hello, could somebody point me in the right direcation with how to populate data for UDTable ?
It does not matter if i am doing it via the visual editor, or if i do it with the code. I have no understanding on how to populate the data for it. Sometimes this work, sometimes it does not. It is really confusing.

Q1: What data does the UDtable expect ? a hashtable, a PSCustomObject, any object ?
Q2: is there any difference when i create a page via GUI page editor rather than creating the app myself ?
Q3: does ‘App’ = ‘Dashboard’ ? I saw many times in documentation word dashboard, but in PSU there is no dashboard, there is an ‘App’, is this the same ?

I have created an App version, where i think i am doing exactly the same thing that happens when using the gui editor:


The app was written using the code only, but essentially it’s all the same, i connect to some webservice , pull data from it, and create an array of pscustomobjects

i can retrieve normally without issues those objects from the webservice in standalone PS7

But when i want to do it only via gui, it does not work at all:

I even made it easier and just created a static PSCustomobject

with just 2 properties : name and domain.

how come this works for app with code, and not for the gui app ?

thank you Greg

On line 26 your property name is name:. You need to change it to name removing the :

Hello Matt, not sure if i follow, where do you see the ‘:’ ? The script is working and is returning the hashtable, two hashtables, that can’t be interpreted by the table in the gui editor

It looks like the problem is with the module that i am loading for managining the vsphere sso:
Invoke-RestMethod: The variable ‘$global:DefaultSsoAdminServers’ cannot be retrieved because it has not been set.
at Connect-SsoAdminServer, /root/.PowerShellUniversal/Repository/Modules/VMware.vSphere.SsoAdmin/Connect.ps1: line 114
at , : line 7
at , : line 1
The variable ‘$global:DefaultSsoAdminServers’ cannot be retrieved because it has not been set.
at Connect-SsoAdminServer, /root/.PowerShellUniversal/Repository/Modules/VMware.vSphere.SsoAdmin/Connect.ps1: line 121
at , : line 7
at , : line 1
The variable ‘$global:DefaultSsoAdminServers’ cannot be retrieved because it has not been set.
at Disconnect-SsoAdminServer, /root/.PowerShellUniversal/Repository/Modules/VMware.vSphere.SsoAdmin/Connect.ps1: line 182
at , : line 9
at , : line 1

It’s really strange , this does not come up when running this in the ‘app’, nor it does not come up in powershell directly.

this is the mentioned module.
I foudn out the option in the API endpoint configuration ‘Error Action’ , i changed it to ‘silentlyecontinue’ , and from then on the api endpoint start to reply with the correct answer.

Any idea if this would be the problem of the plugin, or somehow when i am running this module inside an api endpoint it is not allowed to created global variables ? When i run the same code inside an app, i dont get those errors in log.
Is there anything that could explain this ?

Apologies, please disregard my above post.

Where do you declare your $global:DefaultSsoAdminServers variable?

I am not defining it, this does the module itself (i have not written that module). That’s the same ‘kind of’ global variable i suppose as VMware does with the DefaultVIServers, they locate this in global scope.

I managed to make the gui web app to work find after select error action to silently continue. I thought that there is some issue for modules to define global scope variables somehow.

I see now, I have just browed throught he github.

This may be one for the writer of the code as its outside of PSU

===========================================================================
    Created on:   	9/29/2020
    Created by:   	Dimitar Milov
    Twitter:       @dimitar_milov
    Github:        https://github.com/dmilov
    ===========================================================================

Yeah, i know Dimitar, might contact him, to check this. But i was asking in general basically , about the global variables if there is some know issues if a module wants to use it.