New-UDTextbox with icons

Hi,
not sure what am doing wrong here. Using Universal 3.0 and trying to get a simple icon next to the text

New-UDTextbox -Id "ServerGroups" -Icon server -Value "xyz..."

box but i keep getting the below error.

One or more errors occurred

Cannot bind argument to parameter ‘Icon’, because PSTypeNames of the argument do not match the PSTypeName required by the parameter: UniversalDashboard.Icon.

any help please.

This is definetly the 2.9 method, but I think for v3 you’ll need to try it like this:

New-UDTextbox -Id "ServerGroups" -Icon (New-UDIcon -Icon 'server') -Value "xyz...

(I may be wrong, but I think this is the way, just snooping some of the docs - although i’ve not tried it)

1 Like

thank you insomniacc. I too am a bit confused with the documentation for 3.0 as it sometimes is missing information. even if i use get-help for the cmdlet most of the cmdlets dont have examples or detailed parameter information

I’m sure this will be coming in due course as it seems quite comprehensive in v2 :slight_smile:
Universal + V3 are still relatively new in the grand scheme of things. :+1:t2:

New-UDTextbox -Id "ServerGroups" -Icon (New-UDIcon -Icon 'server') -Value "xyz...
does not seem to work either. I might have to switch back to 2.9. i have wasted 2 days trying to figure it out. doesnt look like the parameter is working

thanks for your help

If I get chance tomorrow I’ll give this a test on v3 and let you know how I get on!

1 Like

Just tested, literally copy and pasting from the docs here: https://docs.ironmansoftware.com/dashboard/components/inputs/textbox#textbox

It’s a bug. Appears to be present on V3 & V3 beta 7. Havent tested on the latest nightly. I’ll quickly check on that, if its not been fixed and theres no existing bug logged for it already, I’ll file one in the repo.

Looks like its been fixed on UD 3.0.2 which is available in the Universal 1.3.1 framework.

1 Like

yep. its fixed in 3.0.2.
thanks for your help