Filtering Records based on length and content of primary key

Discussion created by gham on Jun 12, 2018
Latest reply on Jun 13, 2018 by badmonkey842


Here is an example of the type of data I get out of Quickbooks Enterprise. All the records I have circled in blue are non-existent when checking Quickbooks itself. I don't need these.


I am using these records to create jobs within filemaker, but I don't want to use the blue circle records to create jobs as they would be duplicates. Can you help me with the logic and then the actual scripting to skip or delete these records.


If I were to put it in english I would do this:

  1. Ignore all characters to the left of the hyphen
  2. Find the field with the fewest characters [N] (check that it is not empty for safety)
  3. Delete any record that has more than [N] characters.


What do you think? Can you help me with the script? I would need to ignore these records using an if statement I think.