I have code which calls a function that contains a modal for user input (2 textboxes with a button). The issue is that the underlying script does not “wait” for the modal to complete and return input. The underlying code needs the information from the modal to run successfully. Is there anyway to make this work, or do I need to do a “sleep loop until not null” or some such?
sorry, this is for a dashboard, not the UA stuff. This may be in the wrong place. not sure of the proper place to post a v3 powershell universal dashbaord question.
Basically, I have a modal asking for a username and password, which I am attempting to create a PS Credential object with and use later in the script for a remote connection.
The script proceeds past the modal before I have his the submit button, and not getting the credential
I think I’ve seen something similar on v2.
I had this sort of setup (just a simplified version, not working code, but so you can see the sort of logic)
I found that as soon as the modal opens, the finishing code block runs at the same time in parallel, i think this happens because its considered a separate endpoint.
The solution, copy the finishing code block inside both the top of my if statement, and inside the modal: