Brian Dunning's FileMaker Custom Functions

GetSelectionƒ ( _fieldName ; _recordCount )

Akin to SelectionToArray in other programs, returns all values of a specified field from a given count of found records.

  Average rating: 4.3 (32 votes) Log in to vote

Michael Rhodes   Michael Rhodes
Allied Data Service
http://allieddataservice.com

Share on Facebook Share on Twitter

  Sample input:
GetSelectionƒ ( "id", get ( foundcount ) )
  Sample output:
"1¶2¶3¶4¶"

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

Recursive. Only use on fewer than 1,000 records.

Mimics list option in Summary field. Useful for older version of FileMaker.

 

Comments

Grubber   Grubber, UK
Apr 27, 2009
Thanks but doesn't seem to work?. Returns list of question marks?

Tried returning list to Global Var, Global Field and standard text field? WinXP/ FMA10.
 
Grubber   Grubber, UK
Apr 27, 2009
Opps, my mistake. Didn't spot it needs quotes around the field-name. Thanks. very useful.
 
Michael Rhodes   Michael Rhodes, Colorado Springs, USA
Mar 17, 2017
Fixed long-standing error with this function in that _recordCount needs to be converted to numeric value when comparing to FoundCount, lest ≤ be based on alphanumeric value.

The new'ish list option in Summary fields makes this function unnecessary.
 

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