Get and Set-UDElement on a Textbox that is in a Hidden Table Column

Product: PowerShell Universal
Version: 2.6.2

Hey follow dashboarders,

I have a table with a hidden column, which contains textboxes with individual IDs and a value of ‘False’.

Users select rows in the table and click a button for an action. Foreach row in the selected rows, we perform an action based on the property values in the row. If we are successful, I want to update the textbox.value property from ‘False’ to ‘True’ for the textbox in that row; later actions will be taken on those rows with a textbox.value of ‘True’.

Set-UDElement -Id "textbox_refresh-$($updateRow.RowID)" -Attributes @{value = 'True'}

So long as the table column is not hidden, this works just fine. However, as soon as I add the -Hidden switch to the New-UDTableColumn command it no longer works.

I find that when I’m NOT hiding the column, I can access the textbox from within the console (screen shot 1). But, when I am hiding the column I cannot access the textbox from within the console (screen shot 2).

Seems that when I hide the column, I can no longer use Get or Set-UDElement on the textboxes due to them being hidden. Is there a way around this? A work around would be to use a user friendly column header and a disabled text box with user friendly values, but I’d really, really like to hide the column.

I ended up going with a work around. Since I already have textboxes in the row for the Justification column, and they are not hidden, I worked with them. During processing, when a row is successfully updated I set the textbox for that row to disabled. If a row fails, it remains enabled. Then on table refresh, I pull all the selected rows and filter out those which are still enabled. This leaves me with only the selected rows I want to remove. From there I pull all the rows from the table and use where-object to filter out the selected rows, leaving me with a list of VM Names that I still want to be in the table. From there I run a fresh export of the VMs from VMware, re-create the objects, and re-create the table with only the remaining VMs that we want to be there.

For this instance, I was able to move forward, but if anyone knows how/if we can work with hidden elements I’m sure that knowledge would come in handy later.