Brian Dunning's FileMaker Custom Functions

LastRepDefined ( theField ; SetToZero )

Gets the number of repetitions a field is defined to have

  Average rating: 4.6 (30 votes) Log in to vote

Larry Badten   Larry Badten
TechMedic Computers
http://www.techmedic.net

Share on Facebook Share on Twitter

  Sample input:
LastRepDefined ( Main::Items Purchased; 0 )
  Sample output:
30

(where the field "Main::Items Purchased" is defined for 30 repetitions)

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

This Custom Function returns the number of repetitions a field is defined for. It is NOT the number of repetitions displayed in the field on the current layout (a subset of the total number). This function does require that the field selected be listed in the table for the front window (ex. if the field name is “Main::Items Purchased”, then the front window must use the table “Main”). Otherwise, the result will be “0”.

This Custom Function is recursive.

 

Comments

Bruce Robertson   Bruce Robertson
May 28, 2011
This info is available as the fourth word in the result of the FieldType design function, see:

http://fmhelp.filemaker.com/fmphelp_11/en/html/func_ref1.31.34.html#1037264
 
Bruce Robertson   Bruce Robertson
May 28, 2011
Remove space after html in above link.
 
Larry Badten   Larry Badten, Creswell, OR
May 28, 2011
Oops! Thank you for the heads-up. Built-in functions are definitely better!
 
Bob   Bob, East Hampton CT
May 29, 2011
You Function and Description are in the wrong field on this site
 
Larry Badten   Larry Badten, Creswell, OR
May 29, 2011
Thank you. This is my first post and I put things in the wrong order - fixed.
 

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.

Under construction. Email me your wish list for improvements.