Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4684 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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?

This topic is 4684 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.