Skip 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.

Scripting Challenge

Featured Replies

  • Newbies

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.

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

See TechInfo Article 104191 at the FMI web site.

  • Author
  • Newbies

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

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.