element or(list, position, default)list item Type: For any types t([t], Number, t) -> t

If the number is within the bounds of the list, gives back the element at that position (e.g. 3 gets the 3rd item in the list). But if the number is 0 or less, or greater than the list size, the third parameter will be returned instead.

This is particularly useful for accessing the previous row of a column and avoiding an error on the first element, for example element or(table\\Table#Totals, row - 1, 0) in a Calculate will give the value from the Totals column in the previous row, or 0 if this is the first row of the table.

ExamplesClick an example to insert it
element or(["a", "b"], 0, "z")"z"
element or([7, 8, 9], 3, 0)9
element or([true, true, true], 5, false)false