This might be a bug. I am using web PA. I have a dropdown that executes commands for data collection based on value selected. When the process of gathering of data is happening, I would like user to see a msg like "Loading data. Please wait...". I used Set() to set variable to the msg as the first line and used Set() again to set the variable to "" (blank). However, setting variable lines were not executed.
However, I moved the first line to OnSelect of the dropdown, it executed the line the moment I clicked the control but there needed a line to reset the variable to "" (blank) after the process of gathering data was over which was still in the OnChange hence the msg was not set to blank.
To clarify further, between the 2 Set() commands, there is a ForAll loop which builds a Collection which takes about 15 seconds before it executes commands after it. Which makes it clear that the 2 Set() commands should not be executing one after the other, skipping the ForAll loop.
Fundamental question - shouldn't the code set execute in the order they are written? If that is so then this looks like a bug.
I also tried by moving the codeset to a button and then select the value from the dropdown and then pressing the button, it works; not an ideal way I would like the user interaction to be but it worked as expected. In the past I have never used OnChange() in a dropdown. I have used a loading... gif with circling dots, for such time consuming process and as a good practice to keep user informed, and set its visibility true as the first line of code and then false as the last line of code and it works beautifully. Even this did not work within OnChange in the dropdown.