INDEXOFLIST function is used to find the index of the assigned list value. It’s good at producing a numeric value for list values that follow a scale. The return value index is zero based, i.e., the first value in the list is 0 (zero).


Syntax


INDEXOFLIST(“x”)


Parameters


x = The code of the list attribute you want to use to return the index values on an item.


Type of Data Returned


Numeric


Examples


Assume a list attribute with a code name of “mylist” that possess the labels of: “Low”, “Med”, “High” and “VHigh”.

If an item has been assigned the value of “High”


INDEOXLIST(“mylist”) will return a value of 2


INDEXOFLIST(mylist) will return a value of -1 as the quotations (“”) are missing.


If an item has been assigned the value of “Med”


INDEXOFLIST(“mylist”) will return a value of 1


INDEXOFLIST(mylist) will return a value of -1 as the quotations (“”) are missing.


If the item does not have a value for the attribute coded “mylist”


INDEXOFLIST(“mylist”) will return a value of -1 as no value has been found.