2 Replies Latest reply on Oct 13, 2009 2:13 PM by TSGal

# Help with script

### Title

Help with script

### Post

I have a repeating field (up to 15 per record) and I want to print a report that will capture the right 3 digits of a 6 digit position number. Example

1st record

Tom Jones        900701

Karrie McCarty   912301

Mary Cartwright 911606

2nd record

Ed James          900626

Kenny McCree    912881

Joe Smith          911116

3rd record

Jim Jacklin          900626

Liz Keen            912755

Jimmy Gonzalez   912216

So I would like it to capture 2 records  if I was looking for 700 - 800 for the last 3 digits. I would also like to get a summary of how many cases plus a couple of other fields. Please let me know if you have any advice.

Thanks

• ###### 1. Re: Help with script
Split out your data in your repeating fields to separate related records. It will be much easier this way.
• ###### 2. Re: Help with script

kilbot:

Although the suggestion by mr_vodka is correct (Thank you!), let's assume you remain fixed on using a repeating field.

Create a calculation field, "NumberCalc", that is also repeating.  The formula would be:

Let ( x = Mod ( <Number field> ) ; If ( x ≥ 700 and x < 800 ; x ; "" ) )

Now, you can search this calculation field for an entry in this calculation field, and it will only display those values from 700-799

You can take this one step further by having another calculation "NumberCount" that counts the number of occurrences where 700-799 occurs.  The calculation formula would be:

Count ( NumberCalc )

You can then perform a search on this field for a value greater than 0, and it will display all records that have 700-799 as the last three digits.

If you need clarification for any of the above steps, please let me know.

TSGal

FileMaker, Inc.