Finds the index or placement of a value within an array. The return value index is zero based, i.e., the first value in the list is 0 (zero).
Syntax
INDEXOF([x,x,x,x],y)
Parameters
x = The values possessed in the array
y = The value you wish to find the index of in the array.
Type of Data Returned
Numeric or -1 if the value does not exist in the array.
Examples
INDEXOF([“Low”, “Med”, “Hi”], “Low”) will return the value 0
INDEXOF([“Low”, “Med”, “Hi”], “Med”) will return the value 1
INDEXOF([“Low”, “Med”, “Hi”], “Medium”) will return -1 as that value does not exist in the array.
Using the INDEXOF function to find out a probability (list attribute) of an item.
INDEXOF(LABELS(“probable”),probability) will return the index value of the label “Probable” for the attribute of “Probability” assuming that probable is a label in the list attribute.
Using the INDEXOF function to return numeric values from a string of text
INDEXOF(“SharpCloud Calculated Values”, “Calc”) will return 11
INDEXOF(“SharpCloud Calculated Values”, “oud”) will return 7
INDEXOF(“SharpCloud Calculated Values”, “CALC”) will return -1