Get the index position of the value.
The query for the index of value 3 for the permutation (3,2,4,5,1) gives 1.
© djmw 20050714