Brian Dunning's FileMaker Custom Functions

LastUsedRepNumber ( Field )

Filemaker's Last function provides the actual value contained within the last used repetition of a repeating field, but doesn't give us what that repetition number actually is.

  Average rating: 5.0 (1 vote) Log in to vote

Ralph Learmont   Ralph Learmont - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
LastUsedRepNumber ( Names )
  Sample output:
Sample output = 5

when repeating field 'Names' contains the following values:

||        ||   Sam   ||        ||        ||   Greg   ||        ||

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

Filemaker's Last function provides the actual value contained within the last used repetition of a repeating field, but doesn't give us what that repetition number actually is. There are other custom functions which solve this problem (including my own, but most use an iterative approach to look through all receptions until a value is found.

The feature of this custom function is that no iterative approach is used. Credit must go to Alexander Zueiv.... Inspiration for this idea came from Alexander Zueiv in (FMPexperts Digest, Vol 159, Issue 21) who reminded me about the ability of GetFieldname to do this.

 

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 18 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: