Brian Dunning's FileMaker Custom Functions

GetItemRank ( item ; ValueList )

returns the item rank in a list

  Average rating: 3.9 (38 votes) Log in to vote

Fabrice Nordmann   Fabrice Nordmann - Show more from this author
1-more-thing
https://www.1-more-thing.com

Share on Facebook Share on Twitter

  Sample input:
GetItemRank ( "toto" ; "titi¶toto¶tata" )
  Sample output:
2

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

[EDIT :
I don't use this one anymore, since PositionValue, by Geoff Wells ( http://www.briandunning.com/cf/62 ) does the same, with more features.]

I found Klemens Miller's function cf_getElementNo very elegant, but I needed it to return the rank only if the item was matching exaclty an item of the list, and not if it was only found (= vs patterncount ).
Function returns 0 if item is not matching any list value.

 

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.