January 27, 201213 yr I have a script to Go To Related Record: Open File ["Electronic Recording"] Go to Related Record [show only related records; From table: "Electronic Recording Proceeding"; External; Using layout: <Current Layout>] (If I don't use the Open File step, the file opens at 100% zoom, which is not the zoom level I want.) Here's my question. When the script runs and no related record exists, the result is an empty record. Is there a way to make a custom dialog appear saying no related record exists, and then an "OK" button to close the file? Thanks, Kevin
January 27, 201213 yr You can either test for related records first, or attempt to GTRR and trap for the error. If[ IsEmpty( related::field ) ] // show dialog or whatever End If vs. Set Error Capture ( On ) Go to Related Record [ ... ] If[ Get(LastError) <> 0 ] // show dialog or whatever End If I remember recently discussing whether one way was preferable, but I can't locate the discussion at the moment. I usually do it the first way because it's simpler, but it seems to me that somebody had a reason to prefer the latter method. Can anyone remind me what that reason might be?
January 28, 201213 yr Author Thank you, Fitch. I used your second suggestion and it worked perfectly. Thanks for saving me from a few more grey hairs. Kevin
Create an account or sign in to comment