Support > Repository > Initial value > Example of finding initial value by calculation formula

Initial values ​​can be described by expressions.

The following example is an example in which an expression is described in the initial value of a radio button item.Set "1" if multiple conditions can be satisfied.Otherwise it sets null and puts the radio button unselected.It is described in one line by using a ternary operator.

In the following example, "" is included in the combination of the character string of the repetition item from_address and the item user_account is not blank and the item user_account contains "" If all the conditions that the item subject does not contain the character string "attached file" are satisfied, 1 is set as the initial value.Otherwise it is null, that is, no initial value is set.

  ISINCLUDE(JOIN(${from_address}), ""),
  NOT(ISINCLUDE(${user_account}, "")),
  NOT(ISINCLUDE(${subject}, "添付ファイル"))
) ? 1: null

Related pages

The check box manages multiple values ​​as an array. Therefore, when using a function in an expression, please return the value of the array. Even when returning a single value, please use the ARRAY_INT function etc.

Here is an example of changing the initial value of the check box depending on the authority.


Related pages