Newbies BKlaxn Posted November 22, 2004 Newbies Posted November 22, 2004 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.
-Queue- Posted November 22, 2004 Posted November 22, 2004 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
Vaughan Posted November 23, 2004 Posted November 23, 2004 See TechInfo Article 104191 at the FMI web site.
Newbies BKlaxn Posted November 23, 2004 Author Newbies Posted November 23, 2004 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
-Queue- Posted November 23, 2004 Posted November 23, 2004 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now