Adding row data to another table

Hi community,

I have table A, table B and table C, now I use action of adding row data to add few selected column from Table A & B to C for another purpose. Adding is working correctly, but now my issue is if I adjust or delete a row in Table A & B, it not update or delete  from Table C. I think I need to set up another action or automation but don't know how to do. Is anyone have experience in same situation, can you help me?

Thanks a lot.

0 7 427
7 REPLIES 7

For delete you want to use bot  

These steps how to create bot with action.

A DELET.jpg

B DELET.jpg

1 DELET.jpg2 DELET.jpg3 DELET.jpg4 DELET.jpg

thanks a lot for your guideline. Actually I already found the way to update the copied row when changing data from original table, and also set up Action & Automation same same as your doing. Thanks again.

Copying and maintaining data rows between sheets or database tables is generally inefficient and NOT needed. 

Instead, I would recommend adding an EnumList column as an identifier for the different "usages".  And then filter the rows using Slices.  Managing the inclusion/exclusion of a row from the different usages will be much easier.

For example, create an EnumList column named "Usages" and maybe it's values are "Table A", "Table B", "Table C", "Table D".  This column can have one or more values selected.  When a new row is added, then set the proper usage values.  Maybe done in "Initial Value" expression and if criteria modified later through an Edit then you can TURN ON the "Reset on Edit" to keep the "Usages" column updated.  Of course, you can always use action on Save or a Bot - (there is a delay with a Bot)

Now create Slice datasets for each of the usages:

  • Slice B - criteria is IN("Table B", [Usages])
  • Slice C - criteria isIN("Table C", [Usages])
  • Slice D - criteria isIN("Table D", [Usages])

With this approach, you have the different datasets based on usage BUT only a single set of rows.  You can create views on each Slice independent of the others.

When it comes to deleting, you have options.  Maybe a row delete, deletes for all datasets/Slices ... so just delete the row as usual.   But maybe you need to adjust which dataset/Slice the row appears in/removed from based on Edits made.  Then simply adjust the "Usages" list to add or remove the usage item from the list.

thank you for your explanation. Actually I need table C in which copied from other tables as I have another purpose, if I keep only in 01 table, then it complicated for me to set up other data by formula. But I still can utilize your idea into my other data, thanks again for your help.


@TanHo wrote:

Actually I need table C in which copied from other tables


However, you mentioned...


@TanHo wrote:

my issue is if I adjust or delete a row in Table A & B, it not update or delete  from Table C


This implies you are trying to keep Table C in Sync with Table A.  So I don't still understand the need to perform a physical copy.

There is one other possibility, Table C has ADDITIONAL columns.  If that is the case, then I recommend assigning Table A row as a Ref column to Table C and turn on the "Is part of" property in the Ref column.  Not only will Table C have access to any Table A changes but also if the Table A row is deleted then the Table C row is deleted as well.

If none of this seems to fit your needs, then I guess you no choice but to perform a physical copy. 

To perform physical copy of Table A row of changed values into Table C row, you will need a couple of actions and usage of the INPUT() function.  NOTE:  INPUT() function is still considered beta but many of have been using it successfully

To UPDATE Table C row with changes made in Table A:

1) Create an "Data: set the values of some columns in this row" action to update Table C row with all the columns that possibly could be copied from Table A.

2) Insert the INPUT() function to update each column value following this example format: INPUT("Variable Name", "") - set "Variable Name" to one appropriate to your column.

Example Action :

Screenshot 2023-09-19 at 9.06.16 AM.png

3) Create an "Data: execute an action on a set of rows" action to select the Table C row to be updated AND assign values to be passed.  

4)  Select the action created in 1) as the Referenced Action, when you do you should see an ADD button appear under that selected action.  This where you add INPUT function variables and parameters.

5)  Add variables and apply the correct expressions to obtain the values to be passed.

Example Action:

Screenshot 2023-09-19 at 9.17.38 AM.png

NOTE:  You can use the INPUT() function in expressions for example:

IF(ISNOTBLANK(INPUT("summary","")),
INPUT("summary",""),
[Summary]
)

I hope this helps!

Thanks a lot for your detail guideline, it is very helpful to me !

Top Labels in this Space