Product: PowerShell Universal
Version: 4.0.9
Hey PSU folks,
I have numerous web apps where you’re prompted to enter a username and click a button to search for matching users. This triggers a Sync-UDElement -ID ‘ID of the UDDynamic’. This will get the username from the text box and lookup the possible user matches in AD. If we don’t find users, we populate $noUsers with a message. Otherwise, we build a table and assign it a variable of $table, and we build the button to take actions on the selected user in the table and give it a variable like $button_DisconnectUser. At the end of all this we say
if ($noUsers) {
$noUsers
}
else {
$table
$button_DisconnectUser
}
So, if we don’t find possible users, we display the message we set in $noUsers. Else if we do find possible users, we display the $table and the $button_DisconnectUser.
The issue I’m having is the $table and $button_DisconnectUser are no longer being updated when we search for another user. I’ve used Show-UDToast at each level inside the UDDynamic to prove all actions are being performed and we have updated data, but $table and $button_DisconnectUser are not being updated on screen; we’re left with the table and button from the previous username search.
I’ve tried pulling the table and button out of variables; just using New-UDTable and New-UDButton, without assigning to $table and $button_DisconnectUser variables. I’ve tried removing the if/else at the end and just having it write the table and button at a higher level. Nothing I try is updating the table and button inside the UDDynamic.
This has worked great for the past couple of years, but I noticed this problem after upgrading to 4.0.1. I upgraded to 4.0.9 hoping it would be fixed, but still having the problem.
To note, the tables and buttons are created and work properly with the first username search. After that though, they do not update. A refresh will of course reset everything and work for a single search.
Any ideas?
Thanks,
Rob