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.

Creating related records conditionally?

Featured Replies

  • Newbies

Is there a way to create a record in a related file conditionally?

For example: If two files (File A and File B) are joined by a primary key ID. In File A... If field_ONE="1" , then create a new record in the related file B and display the contents of FIELD_X and FIELD_Y in File B. Else if FIELD_ ONE contains any other value, do not create a record in the related File B. Thanks in advance...

There are two ways to create a related record:

1) Use a script, in which case the script can perform whatever tests you wish before creating the related record

2) Attempt to write to a related field (Relationship::FIELD_X or Relationship::FIELD_Y) on a layout. If the corresponing relationship is set to "allow creation of related records" AND no related records currently exist, on will be created using the primary(left side) key. This key can be a calculated field:

cKey (calculation, stored) = If(field_ONE = 1, Key, "")

If related records already exits, the contents of FIELD_X and FIELD_Y of the first matching record will be displayed and another new record WILL NOT be created.

-bd

Create an account or sign in to comment

Important Information

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

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.