Brian Dunning's FileMaker Custom Functions

positionValue ( string ; searchString ; start ; occurrence )

Return the value's position in a list, including a partial match.

  Average rating: 5.0 (2 votes) Log in to vote

Josh Ormond   Josh Ormond - Show more from this author
Iozax, LLC
http://iozax.com

Share on Facebook Share on Twitter

  Sample input:
positionValue ( "ABC¶DEF¶ACB¶FED" ; "A" ; 1 ; 2 )
  Sample output:
3

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

Sometimes I want the position of a value based on partial match. Similar to how the built-in function Position ( ) works. Simple function to just return the value position in a list.

 

Comments

Nick Lightbody   Nick Lightbody, Deskspace Systems Limited
Jan 5, 2021
This is a efficient means of solving a frequent problem very elegantly!
 
Josh Ormond   Josh Ormond, Iozax, LLC
Jan 6, 2021
Thanks Nick. I was considering wrapping the list in outer carriage returns to allow for easier full-value matching also, but I was uncertain on the demand for that, give the other functions available.
 

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: