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

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

Recommended Posts

Posted

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

Posted (edited)

What does select mean - to you?

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

Edited by BruceR
Posted

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

Posted

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?

 

Posted

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

Posted

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

Posted

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

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