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

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

Recommended Posts

  • Newbies
Posted

I am trying to make a script that will check for duplicate records by checking fields in a specific order. Sort of an IF then script for scheduling. The fields I am using are Date, Time of Day, and Venue. If there is a duplicate record than I would like a message box to pop up. Thanks for your help.

Posted

Create a concatenated calculation of DateToText(Date) & "_" & TimeToText(Time of Day) & "_" & Venue. Then make a self-relationship based on this calc and another calculation dupecalc of serial = selfrelationship::serial. When a duplicate is created, this field will result in 1. In your script, test

If [dupecalc]

Show Custom Dialog ["This date, time, and venue have already been scheduled."]

Halt Script

End If

  • Newbies
Posted

Does this script look right? Or am I missing some language. Thanks for your help.

DateToText(Date) & " " & TimeToText(Time of Event) & " " & Venue

Dupecalc of Serial = Selfrelationship::Serial

If [dupecalc]

Show Custom Dialog ["This record already exists"]

Halt script

End If

Posted

Dupecalc should be serial = selfrelationship::serial. It tests whether the current serial matches that of the first related serial. It should return a zero, however, for dupes, so your test should be If [not Dupecalc]. I don't know what I was smoking yesterday. Ask.gif

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