I make such pop up windows "PsuedoModal" so that they can't be lost behind existing windows and so that the user must close the pop-up before interacting with any of the other windows.
New Window [....
#Windows platform step to minimize window re-size windows are always kept maximized
Move/Resize Window [ Name: Get ( Filename ) ; Current File ; Height: Get ( ScreenHeight ) ; Width: Get ( ScreenWidth ) ; Top : 0 ; Left: 0 ]
#Make new window "Modal"
Show/Hide Status area [Lock; Hide]
Allow User Abort [off]
Pause/Resume Script [Indefinitely]
With this approach all user actions that close the window must also use either the Halt Script button setting or a Halt Script script step to terminate the above endlessly paused script.
I don't see enough info in your post to help you with the rest of your problems as you don't tell us what tables are involved, how they are related, nor how you've set up your Go To Related Record step (There are a lot of options for GTRR steps.) You can even use a GTRR step to both pull up related records and display the results in a new window so you might be able to use it without any new window command. (The above script, modified to use GTRR can still be used to make the pop-up modal.)
Go To Related Records is a very useful tool, but can be hazardous if you don't properly trap for errors. To learn more about GTRR, click the following link:
The Complete Go To Related Record
Thanks for the reply.
The GTRR link was very useful.
I eventually dropped the GTRR and used a Find by passing the partnumber. This allowed me to do some fancy searching by looping the find, deleting the last character each time a zero found records was returned.
I then added back an @ and the remaining characters to see if there was a single miss typed character. If this again returned a zero found records I performed a final find on the previously found character string.
My only problem now is returning the selected partnumber back to the correct portal row. I don't think this will be a big problem.
PS I will try your PsuedoModal technique as well.