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

No related record and a button

Featured Replies

Hi folks !

I have a portal and button script configured there "GoToRelatedRecord" on it. It works fine, if there is a related record.

Is there any way to configure it to create a new related record (in the same button script), if no related records are yet present ?

I assume that the button is situated on the master record, and not within a portal row...

If [ IsEmpty( relationship::primarykey ) ]

#no related records

Else

#related record exists

Go to Related Records []

End If

  • Author

So IsEmpty will do it ? I'll try.

Thank you !

EDIT// Yes ! That works. Thanks again !

In fact, it's a good idea to always wrap a gtrr within an If Else Endif structure, unless you're sure that there will ALWAYS be related records.

The IsEmpty() checks for related records for the current record, but what checks for related records for the current found set?

The IsEmpty() checks for related records for the current record, but what checks for related records for the current found set?

IsEmpty(related::fk_parentID) or not IsEmpty ( related::fk_parentID ) will NEVER work for a found set because this test always evaluates on the current record, as you are getting to, Vaughan.

One should set error capture on and test for If [ Get ( LastError ) = 401 ] after a GTRR to know whether there were ANY related records for ANY record within the found set AFTER the jump. Oh, I can't tell you how many times this one has bitten me. :wink2:

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.