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.

Validate Duplicated Record

Featured Replies

  • Newbies

To validate the duplicated record , I used SELF relational and serial# to do like this

if serial# <> SELF.serial# then DupFlag is TRUE otherwise DupFlag. It works fine in version 5.5 or 6.0, but it seems NOT work properly in version. DupFlag is always TRUE even there is no duplicated record. I just switch to Version 8, still new to it since the architect of 8 is totally diff from its earlier versions.

Any help or idea woulf be appreciated very much

Thanks guys.

So you are testing for match on same field it is joined on? Is it joined on serial = SELF::serial and then your calculation is testing as?

"If serial# <> SELF.serial# then DupFlag is TRUE otherwise DupFlag."

... then you said: "DupFlag is always TRUE even there is no duplicated record." This is a contradiction from your first sentence. NO serials would relate if joined on = except for dup but ALL serials (except for dup) would relate according to your calculation ... mixing apples and oranges, me thinks.

It would have been better to paste your specific calculation here (and specify your join) ... it took you just as long to type it free-form and your exact syntax may have helped us. If() has changed starting in vs. 7. Is this serial an auto-enter incrementing serial? Because FM will NEVER duplicate this serial when you duplicate a record anyway!! Unless you mean you create an auto-enter by calculated uniqueID and you just CALL it serial? The logic is escaping me.

Is serial number or text? Try this: Join serial to SELF::serial on = then appropriate test (via another calc) would be:

If serial is number and calculation result is text: If ( SELF::serial ; "Dup")

If serial is text and calculation result is text: If (not IsEmpty ( SELF::serial) ; "Dup" )

If serial is number and result is number (boolean)B) not not SELF::serial

... last will produce 1 (or true) if duplicate.

LaRetta :wink2:

  • Author
  • Newbies

Sorry for not making it clear myself. Here is what I try to do. I want to build a small DB to allow swimmer to register their swim meet. One of the validation is that they CANNOT have duplicated event number with the SAME Meet ID.

File: SwimMeetEntry.FP5

Serial#: number, increase by 1, cannot modify

Meet ID: number

Event Number: number , valid only DupFlag = 0

DupFlag:

Case (

IsEmpty(Event); 0;

Serial# = SELF Relation name::Serial#;0;1)

Self relational by MeetID = Meet ID and EventNumber =Event Number

This set up is work fine under FMP 6, but it's not work for 7 or 8, actually it's not work properly.

I am using FMP 8 Advance on Window XP.

I could not find where I can attach the file for you to look at it. If you don't mind please give you email then I can send to you. My email address [email protected]

Thank you very much for your time

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.