How to add items to an Array

Through trial and error I figured this out. Hope it helps others.

You must use a Flow if you want to add items into an array object on your page when using dynamic events (e.g. on click of a button).

  1. Create your Array
  2. Create a Flow
    image
    2.1 Setup a Param to pass values into the Flow

    2.2 Add a Run step
    image
    2.3 Select the appropriate array action you want to use and populate it with the param value
  3. Add a dynamic event to your element

    3.1 Click the Action button
    image
    3.2 Add your flow and populate the paramter with your value.
1 Like

Hello, you don’t actually need to use a flow to add or remove items in an array.
Here’s the documentation explaining how to use it:

The same applies to all other dynamic events such as click etc.

Then there’s a bug as it wasn’t working.

I tested it this morning and everything is working perfectly fine. Probably you are making something wrongly.