Thanks for the tip about using the Paste Result, it does the same thing in one command that I was doing in two commands.
In my script I do not set a global field with the error code after the Exit Record/Request. If I do that, then yes the script will terminate as the field validation fails and throws a user error message to the screen, instead I immediately check the error status after the Exit Record/Request. This allows me to check the success of the Paste Result and make a decision about what to do next depending on the error code. My script in practice is more elaborate than the snippet I posted here. The script actually sets an IP address and if that address violates the validation rule of the field then I increment the IP address via a Loop and Paste in a new value. Again if the address violates the rule I continue until I get to an address that is unique in the database and exit the Loop. The script works well for the task I need it to complete.
Dale