Brian Dunning's FileMaker Custom Functions

isFirstRecordWithValue ( sortedBy )

Used to hilite the first record of a given value in a sorted list of records.

  Average rating: 4.9 (31 votes) Log in to vote

Max Heller   Max Heller - Show more from this author
fmax software

Share on Facebook Share on Twitter

  Sample input:
Set of Records sorted by the field "Fruit"

isFirstRecordWithValue ( getFieldName ( data::Fruit ) )

Records Number: Fruit | Amount
1: Apples | 4
2: Apples | 2
3: Bananas | 3
4: Bananas | 2
5: Bananas | 3
6: Pears | 2
  Sample output:
For each Record Number:

1: True
2: False
3: True
4: False
5: False
6: True

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

You can use this with custom formatting on a sorted list of records to identify the first record in each grouped set to hilight or otherwise distinguish between the groups of values.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:

Under construction. Email me your wish list for improvements.