2.3.1 bug - Get-UDElement


#1

Adam,

Get-UDElement is broken for UDSelect objects. A UDElement object is returned, but the Attributes property is null.

Get-UDElement works as expected for UDTextbox objects.

Thanks,
Tim Curwick


#2

I am seeing the same behavior with 2.3.1

I can return UDTextbox objects, but am unable to return UDSelect object.


#3

Looks like a fix is done and will be part of 2.3.2.


#4

I’m being a complete pain in the behind here - is there an alternate way to get the value of the UDSelect after it has changed?


#5

I haven’t tested it, but I would try somethiing like this.

New-UDSelect ... -OnChange { $Session:Selection = $EventData }

New-UDButton ... -OnClick { If( $Session:Selection.Trim( '"' ) -eq 'Lunchtime' ) { 'Awesome' } }

#6

Tim -

Thank you for the suggestion.

I had tried something similar - the $EventData on a UDSelect returns the value/Number of the item in the Selection. I’m dynamically building the Items in several of my SelectBoxes. I guess I can push those dynamic items out to an array and pick it out of the array later. I’m just feeling lazy, and would prefer to get the contents of the Selectbox.

Kirk.


#7

I have tested an early build of v2.3.2, and it is fixed. It should be released soon.


#8

:grinning:

Awesome! I have so many plans for this… hah! Our in house developers C# are shaking their heads at this. I will show them!