Set-UDElement Value is null

Not sure if this is a bug or something I’m doing wrong but when I use, for example:

Set-UDElement -Id 'txtfirstName' -Properties @{
       Value = $firstName

The actual value of the textbox is still null when I view the $body (this is in a New-UDForm)

Is this something I’m doing wrong? As a workaround, I’m having to get the value again by using:
$Value = (Get-UDElement -Id 'txtfirstName').value in the -OnSubmit block

Seems like a bug. It’s not updating the “form context” that we use internally to track state so that’s why it’s failing to return in $body

Ah okay, thanks for the clarification.

Hi Adam, is there any update on a fix for this?

Sorry this hasn’t been resolved yet. I will make sure it makes its way into 1.4.7.

1 Like

Working fine in 1.4.7 :slight_smile: many thanks.

Hi Adam, just updated to 1.5.2 and I think this may of returned again.

See below gif



Hi Adam, not sure if you have seen my latest response to this one?

Not sure if this bug has returned in 1.5.2? Can you clarify?

Many thanks,


Sorry for the delay. Just getting back at it from the holiday. I’ll take a look today.

1 Like

Just an update on this. I can reproduce this issue and it’s a regression. Unfortunately, the code that was used to fix the originally hasn’t changed so trying to track down what is affecting it.

1 Like

Okay thanks for the update :slight_smile:

Solved. This will be in the 1.5.4 build and is in the nightly build. Apologies for that regression.

1 Like

Brilliant, thanks for sorting that so quickly