FAQ: add a set of rows

When a row is added to a table, add a set of rows to another table.

Try the sample app!

This example uses three tables:

  1. Master Table: when a new row is added here, all rows from Source Table will be copied to Target Table and linked back to the new Master Table row. This table must allow adds.

  2. Source Table, from which all rows will be copied to Target Table.

  3. Target Table, to which all rows from Source Table will be copied. This table must allow adds.

Action 1: Copy Source Table rows to Target Table for this row

This is the action that initiates the process; invoke it upon adding a row to Master Table.

  • For a record of this table: Master Table
  • Do this: Data: execute an action on a set of rows
  • Referenced Table: Source Table
  • Referenced Rows: filter("Source Table", true)
  • Referenced Action: (set below, after action 2 is created)
  • Only if this condition is true: TRUE (or blank)

Action 2: Copy this row to Target Table

Add a new row to Target Table using this Source Table as a template.

  • For a record of this table: Source Table
  • Do this: Data: add a new row to another table using values fom this row
  • Table to add to: Target Table
  • Set these columns:
    • Parent: maxrow("Master Table", "_rownumber")
    • (other columns as desired)
  • Only if this condition is true: TRUE (or blank)

Action 1

Return to (action 1) and set Referenced Action:

  • Referenced Action: (action 2)
10 Likes

More Wisdom :ok_hand:t2:

1 Like

Brilliant!

1 Like

Very clever… Saved this one… Thanks @Steve:slight_smile:

1 Like

What does this mean here? Select the whole Source Table?

1 Like

I understood equally, to return whole table.

Equivalent with

select(Source Table[ID], true),

but interesting to see what Steve would clarify.

1 Like

Yep.

Correct!

Also equivalent:

Source Table[ID]
1 Like

Gotcha! :+1:

1 Like