Brian Dunning's FileMaker Custom Functions

ConsecCount ( ItemList ; StartingItem )

Counts how many consecutive years (or other numbers) are in a field from a particular starting point.

  Average rating: 4.5 (24 votes) Log in to vote

Howard Schlossberg   Howard Schlossberg - Show more from this author
FM Professional Solutions
http://fmprosolutions.com

Share on Facebook Share on Twitter

  Sample input:
ConsecCount ( "2004¶2003¶2002¶1999¶1998" ; "2003" )
  Sample output:
2

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

Uses a recursive function to count how many consecutive years (or other numbers) are in a field from a particular starting point going backward.

ItemList would be either a text field that contains all the values, or else it might be derived from a set of related records using the valuelistitems() function.

 

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.