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.

check related records on record creation

Featured Replies

Hi All,

 

Recently found out that some of the users of my system have accidentally created duplicate records which I've had to go through manually and delete. Seems sometimes the network connection is slower, so they click the button more than once while the system is still responding to the original request, thus creating two related records with the same date, separated by mere seconds in the creation time field. I would like my related record creation script to detect if related records already exist if the creation date matches the current date. Probably best to prompt the user a record was just created and request approval to create another one. Or perhaps, is it possible to have this script detect related records created within a two hour window instead?

 

Here's the hierarchy:

 

The user searches for an Asset (Assets table)

The user creates a Quality Control "QC" record for that asset (Quality Control table).

 

Whats the most efficient way to do this? Does it require the script to perform additional searches?

Recently found out that some of the users of my system have accidentally created duplicate records which I've had to go through manually and delete. Seems sometimes the network connection is slower, so they click the button more than once while the system is still responding to the original request, thus creating two related records with the same date, separated by mere seconds in the creation time field

 

Is your business rule that there must be only a single QC record per asset per user per day?

 

Then in the QC control table, you could define a calculation field* as, say, userID & "|" & GetAsNumber ( date ), read in a List() of this field for the current asset's related records and, using FilterValues(), check this list against the expression “userID & "|" & GetAsNumber ( Get ( CurrentDate ) )”. If the filter yields a result, there already is a record for this asset/user/day combination, and you can alert the user and exit the script.

 

*You could employ this technique without that field, but this would make the script more convoluted, and possibly slower.

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.