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

Featured Replies

Hi,

Im trying to write a script to select unique records from a table (see below). WIth no result :( . On this particular example script should select only records 1,2,3,6. 

 

image.png.609b8a237a799c8bb6949ba4feef290a.png

What does select mean - to you?

And after "selecting" - what is next? What are you actually trying to do?

Edited by BruceR

  • Author

In "table view" I want to see displayed only those records. In FileMaker world you call it found set?

Is there any other commonality beside the amounts in 4 and 5 being the same as 1 and 2,  other than being the same amounts?

 

  • Author

No.

Hello spand, 

Please use real names for things like fields, scripts, relationships etc., when posting a question. Please review the Anatomy of a Good Topic, and pay close attention to Steps 5, 6, 7, and 8.

2 hours ago, spand said:

On this particular example script should

What script? What steps are in your script? 

Did you know that, if you perform a find manually, it can be used in your script?

Why not post a copy of your file, or a mockup of it showing everything involved ?

Lee

Here is one example.

Concatenate the fields that you determine need to be unique. A&B&C  then a self join relationship that test for the Num = Min ( showUnique::num)  will always show 1 if it is the first one of any duplicate records.

Find 1 in the isUnique field.

this method does require schema change (fields & table occurrence) a complete scripted method is possible too. 

unique.fmp12.zip

  • Author

Thanks Ocean West,

I read about self join relationship method. However, I'd like to learn to script this.

I added calculated filed with A&B&C. I watned to check record against a previous one and flag it in "duplicate" filed.  But it wont work if the same fileds are not one after another. 

example1.fmp12

Create an account or sign in to comment

Important Information

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

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.