Brian Dunning's FileMaker Custom Functions

LastIndexOf ( text ; chars )

Search text from right to left.

  Average rating: 4.4 (27 votes) Log in to vote

Lin Feng   Lin Feng
None
None

Share on Facebook Share on Twitter

  Sample input:
LastIndexOf("ABC,XYZ,UVW"; ",")
  Sample output:
8

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

Search text from right to left.

 

Comments

Tim Anderson   Tim Anderson, Tim Anderson Group
Mar 11, 2015
How about

Position (text; chars ; length(text); -1)
 
unix   unix, Japan
Apr 2, 2015
You are right if chars is a char.
If chars is not a char,

Position ( text ; Right ( Filter ( text ; chars ) ; 1 ) ; Length ( text ) ; -1 )

This use Filter() , so not recursive but case sensitive. for compatible

Position ( text ; Right ( Filter ( Upper ( text ) ; Upper ( chars ) ) ; 1 ) ; Length ( text ) ; -1 )
 

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.