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

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

Recommended Posts

Posted

I have a button that takes the user from LayoutA to LayoutB based on the script Go To Related Record. But, when there is no found set, it doesn't do anything. I tried using IsEmpty and RecordCount = 0 to try to catch the error so that I can bring up a custom dialog box but can't seem to get it to work. Is there another way of making the dialog box popup when there are no records in the foundset.

Posted

The behavior of the Go To Related Records[] script step has changed in FM7. Now, if there are no related records, the found set remains unchanged.

To deal with this, you should test for the presence of related records before performing the GTRR step:

If [ Relationship::RecordID ]

Go to Related Records [ Relationship ]

Else

Show Custom Dialog [ Message ; "No related records." ]

End If

Posted

Really strange. I setup the script like you said and when there are related records, it still evaluates to true and shows the related records but for some reason, the else statement still does not work and no custom dialog box appears. Can you tell why this could be because the logic is right but I don't get it.

Posted

...I setup the script like you said and when there are related records, it still evaluates to true...

This should be the case. If there are related records, then the first related record will have a record ID>0, and the If[] evaluates to true.

The Else part only evaluates if there are no related records.

Posted

Thanks for your help. I was setting up the if statement wrong. I was using If[Table1::IDField1] but then I realized that this would alwys evaluate to true so then I realized that the proper if statement should be the following

If[Table1::IDField1 = Table2::IDField2].

Posted (edited)

I have a similar problem. I have two layouts. One is used purely to find a record (or set of records. Afterwards a script takes the user to a layout where they can update the selected record.

I understand that GTRR doesn't work with the separation model. If this is correct, then what is the best way to do this?

Edited by Guest

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