Jump to content

No related Record


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

Recommended Posts

Hi,

I have a button pointing to a related record in another d/b in a script.

d/b 1, script1: go to related record; goto external script in d/b 2.

d/b 2, script1: go to Layout Main

The problem is that if there are no matching related records, it still goes to the layout in main to the record it was last at which is wrong. It should have a message saying "No matching records"

Is there a way to prevent this? For example, is there a way to say "If (no related records) then..."?

Thanks!

Link to comment
Share on other sites

First try de-bugging your script. Pause it before and right after each find...I've had problems if the field used for the find isn't on the layout used for the find, or other problems may turn up. If there just aren't any 'bugs', check to make sure 'Set Error Capture' is either set to 'off' or isn't in the script at all - this should allow the 'No files found' alert to come up automatically.

If Error Capture is not part of your script, or is already set to 'Off', try setting Error Capture 'On', then use an 'If' statement to display the message you want...something like...

Enter Find Mode

Set Field ["FieldName","Find Me"]

Set Error Capture [On]

Perform Find

If["Status(CurrentError)= 401"]

Show Message ["No Records Found"]

End If

Hope this helps! Good Luck! crazy.gif" border="0

Link to comment
Share on other sites

This topic is 8355 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.