Product: PowerShell Universal on IIS
Version: 1.5.14
Is that a way to create a multiple select like this:
I am tying to use New-UDSelector and getting the error “It is not possible to call a method on an expression that is NULL”. The module UniversalDashboard.UDSelector has been installed via marketplace.
The following is my test code:
Try changing those double quotation mark characters (the “ and ” characters that look curly “) to just plain " or ' characters, to match the same ones used around Select Security Members... and Test_Function. Those curly style double quotation mark characters might be causing you grief.
Thank you @pharnos for your prompt reply.
I found out: no more error rises when I add the parameter -Selected { }. It seems
that -Selected is obligatory even it is empty.
To your suggestion with New-UDSelect -Id ‘stuff’ -Multiple
I had tried this option before. But I need a button to get the values.
(Get-UDElement -Id ‘staff’’).value returns nothing
Have you a tip how to get those selected multiple values?
Really sorry for late reply, been busy on lots of different projects lately…Thank you @pharnos for your support in the matter.
Ok to get the values look here:-
which gives a demo on the readme…there is also useful comments on this forum. The -SELECTED parameter allows you to pre-select items from the list so you can have them already shown in the choice selected option. I got requested this but stupidly didn’t update the README to state it is a mandatory parameter. If you do not like this, then you can use the previous version. Hope this helps, again apologies on the delay just been a busy man…let me know if you need a bit more guidence thank you.