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

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

Recommended Posts

Posted

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?

Posted

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.

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