February 20, 20187 yr 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.
February 20, 20187 yr What does select mean - to you? And after "selecting" - what is next? What are you actually trying to do? Edited February 20, 20187 yr by BruceR
February 20, 20187 yr Author In "table view" I want to see displayed only those records. In FileMaker world you call it found set?
February 20, 20187 yr 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?
February 20, 20187 yr 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
February 20, 20187 yr 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
February 21, 20187 yr 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
February 28, 20187 yr Now that you've made the field, just do a find for ! and you're done. This can be easily scripted. https://www.filemaker.com/help/16/fmp/en/#page/FMP_Help%2Ffinding-duplicate-values.html
Create an account or sign in to comment