Best practice to pause script until user completes action
From any layout, I want the user to be able to press a button, enter/modify data on Layout 2 and automatically return to original layout when done.
What is the best practice to give the user the time to do what he needs?
My solution is to add to Layout 2 a button setting global field Finished to Yes. The script looks something like this.
Go to Layout 2
Pause script for 1s
Exit loop if Finished = Yes
Set Finished = No
Go to original layout
It works well enough, but the Pause for 1s step is very clumsy. I am sure that I am missing an obviously better way. Should I save the name of the original layout in a global variable and use it in another script to return from Layout 2? This seems inelegant as well. Any suggestion would be much appreciated. W.