Block - Set Table Rows with Multiple Columns

This sample shows how to add rows with some value for multiple columns when creating an entry.

Default form

  1. In form design
  2. Enable automation
  3. Drag & drop Action block
  4. Add Action
  5. Select Create
  6. Set Variable set such as [[“Row 1”, “1”], [“Row 2”, “2”], [“Row 3”, “3”]]

  1. Click OK

screenshot-2023.06.06-15_02_21

  1. Drag & Drop Condition block
  2. Write #Form#Table.Count <= 0

#Table is the table name in this form. I have to set the variable in this table rows when the table is empty (Count <=0 or Count == 0)

screenshot-2023.05.30-14_10_51

  1. Drag & Drop For block
  2. Select #list and each type ‘x’ (any name to define each of the items from the variable)

screenshot-2023.06.06-15_03_00

  1. Drag & drop action block
  2. Click add action
  3. Select ‘Create’
  4. Add Value: #addRow(#Form#Table)
  5. Click OK

  1. Click add action
  2. Select ‘Set’
  3. Variable, choose #AddTable
  4. Expand Property
  5. Add value #Text and Set #x[0].ToString()
    x[0] is to set the first value (Row 1) in Text column
  6. Continue add other value, #Number and Set #x[1].ToString()
  7. Click OK

Here is the full view of the automation

Result in Client

Note:
No column is set Formula to set the auto row number.