APPEND Function

Description

It takes an array as the first argument and creates an array with the elements specified in the second and subsequent arguments.

If the second and subsequent arguments were arrays, then the elements in that array are individually added to the array of the first argument. If the second and subsequent arguments are not arrays, add them to the first argument array as is. (*1)

It does not change the original array.

Usage Examples

The following example returns a new array with the String “A Decision” appended to the Selection Items selected by the checkbox.

= append(checkbox, "A decision")

You can specify multiple elements to add.

= append(checkbox, "A decision", "B decision", "C decision")

The following example adds all Selection Items selected in checkbox_2 to checkbox_1. (*1)

= append(checkbox_1, checkbox_2)

(*1) Compatibility with older versions

In the APPEND before version 1.128 (released on April 8, 2021), if you specify an array with the second and subsequent arguments, the array itself was added to the first array to create an “array of arrays”. The behaviour described in this document starts with version 1.129 (released April 15, 2021).

Example:

append

The results will be

  • 1.128 or earlier ⇒ [1, 2, 3, [4, 5]]
  • 1.129 or later ⇒ [1, 2, 3, 4, 5]

関連記事