Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Related Record Issue

Featured Replies

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.

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

  • Author

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.

...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.

  • Author

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].

Same thing:

If [ Table2::IDField2 ]

Go to Related Records [ Table2 ]

...

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.