Index

Returns the index of the specified string within the Databox value.

This is useful to find the position of an item in a comma separated list (or other separator). The first argument (aka parameter) is the string of text you are looking for. The second argument is the delimiter that separates the list of items.

Counting starts from 1 and zero is returned if the item is not found in the list.

Expression
Databox Value
Result

Index(" line2", ",")

line1, line2, line3

2

Index("red", "/")

Blue, Red, Green

0

To avoid mistakes with mixed case, this will switch the Databox contents to upper case and then look for "RED"

Expression
Databox Value
Result

Upper Index("RED", "/")

Blue/Red/Green

2

Last updated