Brian Dunning's FileMaker Custom Functions

GetFoundSet ( FieldName )

Gets a field's value across either the current found set or related records

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

Howard Schlossberg   Howard Schlossberg - Show more from this author
FM Professional Solutions

Share on Facebook Share on Twitter

  Sample input:
GetFoundSet ( "FirstName" )

GetFoundSet ( "LineItems::ItemName" )
  Sample output:


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

Gets a field's value across either the current found set or related records. This was written when custom functions first became available, before the List() function was added to FileMaker. The remaining value of this function, though, is its ability to work across the local found set.

1) Fieldname MUST be in quotes
2) For related fields, use entire field path (i.e. "TO::fieldname")
3) For local fields (current found set), use field name only (i.e. "fieldname")



Yannick Van den Eijnden   Yannick Van den Eijnden, Antwerp
Jul 29, 2010
Nice function, thanks for adding this
Martin Inchley   Martin Inchley, Christchurch, UK
Nov 16, 2012
Using quotes to enclose a field name will give problems should you ever need to change the name of the field. To future-proof it I use the Evaluate function, together with the complete name of the target field:

GetFoundSet ( Evaluate ( "\"" & Right ( GetFieldName ( TO::FieldName ) ; Length ( GetFieldName ( TO::FieldName ) ) - Position ( GetFieldName ( TO::FieldName ) ; "::" ; 1 ; 1 ) - 1 ) &"\"" ) )

This resolves to the current short name of the field in quotes.

Thanks for the function, Howard – very useful.
Tux   Tux, Montreal
Jan 21, 2014
Using this function different times during the same session on the same found set seems to alternate correct and incorrect results. Something to do with leaving $$TotalCount or $$RecCount set?

Anyone else run into this?
StevenZLi   StevenZLi, Ohio
Apr 28, 2014
One problem I did notice is that the behavior of "Count" and "Get(FoundCount)" are different. For "Count", empty values are not included, and you get a smaller number if there are empty values - thus retrieve less values.

This may only be a problem if you're trying to retrieve data in a field from related table that contain empty cells.

Log in to post comments.


Note: these functions are not guaranteed or supported by 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 16 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: