Support > Repository > Function > Choice
ja | en

We introduce two functions concerning selection processing.


CHOOSE (index, string, string, ...)

CHOOSE (index, array of strings)

CHOOSE_BYTE (index, 1 byte integer, 1 byte integer, ...)

CHOOSE_BYTE (index, array of 1 byte integers)

CHOOSE_SHORT (index, 2 byte integer, 2 byte integer, ...)

CHOOSE_SHORT (index, array of 2 byte integers)

CHOOSE_INT (index, 4 byte integer, 4 byte integer, ...)

CHOOSE_INT (index, 4 byte integer array)

CHOOSE_LONG (Index, 8 byte integer, 8 byte integer, ...)

CHOOSE_LONG (index, array of 8-byte integers)

CHOOSE_FLOAT (index, 4 byte floating point, 4 byte floating point, ...)

CHOOSE_FLOAT (index, 4 byte floating point array)

CHOOSE_DOUBLE (index, 8 byte floating point, 8 byte floating point, ...)

CHOOSE_DOUBLE (index, 8 byte floating point array)

Returns a value based on the number specified for index.The return type is a string type. If the corresponding element is not included, null is returned.

CHOOSE ($ {index}, value 1, value 2, ...)

An example Behavior
CHOOSE(1, "a", "b", "c") "a"
CHOOSE(3, "a", "b", "c") "c"
CHOOSE(0, "a", "b", "c") null
CHOOSE(4, "a", "b", "c") null
CHOOSE(2.5, "a", "b", "c") "b"


This is a special function that can be used when setting the initial value.Returns the number of the container row currently being operated on items in the repeating container.The number starts from 1.

Here is an example using CID function.