Copy Rows with a checkbox to another table automatically

Is there a way to automatically copy rows with a checkbox from one table to another table if checked?

Screen Shot 2023-03-28 at 8.53.23 AM
I have this Master table, and I would like to automatically copy the Lot # and Variety, which are referenced from another table, into another table if the check boxes are checked.


This is the table I would like to have the rows copied to. Is there a way to automatically do this when I check a box?

Hi @Laura_Parker :blush:

You could either do this using a button or an automation :blush: .

For the automation you could set it up as follow :

  1. When

→ Select: Row changed
→ Table: Select Master
→ Column: Select [Bulk Offered]

  1. If:

It’s not mandatory to add an If… It depends on your actual needs :innocent:.

But in this case you might want to add something like:

thisRow.[Step 1 Result].[Bulk Offered?] = true

The row reference [Step 1 Result] is the row that triggered the automation.
In other words, it’s the row where the changed occurred and a checkbox was either checked or unchecked.

To avoid the copy of a row when a checkbox is unchecked, this If should check if the value in the row that triggered the automation is true or false.
If true it will go on and do what you asked it to do in the step Then but if false, it will stop there :blush: .

  1. Then

→ Select Add row as the action to perform
→ Table: Select [Bulk Offering]
→ Set values: You’ll need to select the appropriate fields where the info need to be copied and enter the desired value for each of these fields. For these values, you can also use the row reference [Step 1 Result]

Example: for the value for the field Variety in the table [Bulk Offering], you can use :

thisRow.[Step 1 Result].[Variety 1]

… and of course, this should be done for all the other field in [Bulk Offering] :blush:

Here’s a small very quick sample to illustrate :innocent:
(You should be able access the automation in Document settingsAutomations )

Note that automations can run with a certain delay :hourglass_flowing_sand: .
And there is not really a way to know when you’ll see the effect of the automation :blush:

Or, instead of checking a checkbox, you could use a button to copy a row from a table to another :innocent:

If you look at this other very quick sample just below, I copy the row from the table From to the table To (:sweat_smile: ) using this Action formula :

RunActions(
  AddRow(
    To,
    To.Name,
    thisRow.Name,
    To.Number,
    thisRow.[A number]
  ),
  ModifyRows(thisRow,thisRow.[Disable button],true)
)

The first action (AddRow()) add a row to the table To with the desired value for each field and then the second action (ModifyRows()) simply check the checkbox in thisRow.[Disable button] to disable the button once the row has been copied (to avoid duplicates in the table To) :blush: .

I hope this helps :innocent:
(Sorry, I’m somewhat away at the moment but don’t hesitate if you have questions :blush: )

1 Like

Hey there!

Just launched a pack that should help you do this automatically

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.