spand Posted February 20, 2018 Posted February 20, 2018 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.
bruceR Posted February 20, 2018 Posted February 20, 2018 (edited) What does select mean - to you? And after "selecting" - what is next? What are you actually trying to do? Edited February 20, 2018 by BruceR
spand Posted February 20, 2018 Author Posted February 20, 2018 In "table view" I want to see displayed only those records. In FileMaker world you call it found set?
Lee Smith Posted February 20, 2018 Posted February 20, 2018 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?
Lee Smith Posted February 20, 2018 Posted February 20, 2018 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
Ocean West Posted February 20, 2018 Posted February 20, 2018 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
spand Posted February 21, 2018 Author Posted February 21, 2018 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
Fitch Posted February 28, 2018 Posted February 28, 2018 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now