AnsweredAssumed Answered

Selecting 1 contact per company from a found set

Question asked by rowing190 on Nov 7, 2008
Latest reply on Nov 7, 2008 by rowing190

Title

Selecting 1 contact per company from a found set

Post

I am attempting to write a script that will allow me to constrain a found set of records to only 1 contact per company. Unfortunately, the script that I have composed is selecting every other record. Here is the script:

 

Sort Records [company id]

GoToRecord/Request/Page [First]

Loop

GoToRecord/Request/Page [Next;Exit after last]

If [company id = company id]

Omit Record

End if

End Loop

Exit Script

 

 

I am new to Filemaker Pro and writing scripts. I assume that I must be making a mistake in the "if statement". If anyone has a suggestion on how to correct my script, that would be great.

Outcomes