Computes the index at which a specified element is first found within an array, when searching right to left. Returned value is based on left-to-right indexing. |
0
. Rightmost index value is the same value returned by ARRAYLEN function.Array literal reference example:
arrayrightindexof(["A","B","C","D"],"C") |
Output: Returns the right-index of the element "C" in the array, which is 2
in an 0-based index from left to right.
Column reference example:
arrayrightindexof([myValues],myElement) |
Output: Returns the right-search in the myValues
arrays for the elements listed in the myElement
column.
arrayrightindexof(array_ref,my_element) |
Argument | Required? | Data Type | Description |
---|---|---|---|
array_ref | Y | array or string | Name of Array column, Array literal, or function returning an Array to apply to the function |
my_element | Y | any | The element to locate in the array, searching from right to left |
Name of the array column, array literal, or function returning an array whose element you want to locate.
Required? | Data Type | Example Value |
---|---|---|
Yes | String (column reference or function) or array literal | myArray1 |
Element literal that you wish to locate in the array. It can be a value of any data type.
Required? | Data Type | Example Value |
---|---|---|
Yes | Any | "1st"
|