Brian Dunning's FileMaker Custom Functions

ITA_PositionIndexValues ( textList ; searchList ; searchValue ; occurrence )

Returns list of values found in searchList at the same index as the position of SearchValue in textList.

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

Thomas Myers   Thomas Myers - Show more from this author
Innovative Technology Applications
http://itainc.com

Share on Facebook Share on Twitter

  Sample input:
ITA_PositionIndexValues(
List( "TimeOff"; "Bonus"; "TimeOff") ;
List("2018-1";100;"2018-2"; "2018-1");
"TimeOff";1)
  Sample output:
2018-1
2018-1

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

I often have a relation that I have filtered on. Example all pay adjustments for THIS year. When I need a quick count of values without making new relations (and not using slow sql). I can use this function. So the list( adj:type) will return a value list of all the adjustments. But I need to count all the quarter 1 items.

ValueCount(FilterValues( ITA_PositionIndexValues ( List( adjThisYear::type) ; List( adjThisYear::yearQuarter) ; "TimeOff" ; 1 ); "2018-1"))

If I want to see dates I could just pass in List( adjThisYear::Date) instead of quarter.

 

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