Brian Dunning's FileMaker Custom Functions

WordIndex ( valueList ; indexWord )

Word Index finder, Find word Index, Find word postion, finding word postion in list in filemaker.

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

Nishant Kumar   Nishant Kumar
Mindfire Solutions
http://www.mindfiresolutions.com/

Share on Facebook Share on Twitter

  Sample input:
WordIndex ("Nishant" & "¶" & "Sukant" & "¶" & "Roshan" & "¶" & "Dilip" & "¶" & "Manish"; "Roshan")
  Sample output:
3

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

This custom function is used for finding word postion/Index in new line seperated valuelist.

 

Comments

William Best   William Best, Seattle
Apr 25, 2012
May be as useful without recursion

Let(
[n=Position(_list;_word;1;1);newlist=Left(_list;n)];
Case(n>0;PatternCount(newlist;"¶")+1;0)
)
 
Nishant Kumar   Nishant Kumar, Bhubaneswar
Apr 26, 2012
Thanks william for your comment, I have also used this code this is the another possible way by which we can achive same functionality....I think

Let(
[n=Position(_list;_word;1;1);newlist=Left(_list;n)];
Case(n>0;Pattern Count(newlist;"¶")+1;0)
)

This custom function might be here, I just finded another way of doing same thing that's why I submitted it here.
 

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: