Help with Synchronizing Data Between Two Tables (Update Button)

Hello everyone,

I have developed a production downtime app where users can input various reasons for downtime that occur during production. The structure of the app is quite simple.

Table A:
- Key
- Name
- Downtime Reason 1
- Downtime Reason 2
- Downtime Reason 3
- Downtime Reason 4

Table B:
- Key
- RefKey
- Name
- Downtime Reason

Users can only make entries in Table A. When an entry is created, a bot triggers and adds one row in Table B for every downtime reason. Essentially, Table B contains the same information as Table A but has a different structure. All keys are UIDs, and the "RefKey" column is of type "Ref," referring to the key in Table A.

I noticed that when I enable the "is part of" checkbox for the "RefKey" column, it automatically deletes all referenced entries from Table B when I press the delete button on a row in Table A. This is exactly what I want. However, the same does not apply to the update button. When I press the update button, it changes the data in Table A but does not affect the data in Table B.

I have tried many things (actions, bots, disabling "is part of," and removing references). If anyone can help me find a solution to this problem, I would be very grateful!

Thank you so much in advance!

0 3 122
3 REPLIES 3

Hi, 

I think this is what you are looking for. 

โ€œHow can I update a parent record when a child record is changed?โ€
โ€œHow can I mark all the line items in an invoice as paid when I mark the invoice as paid?โ€
โ€œIf I have App Formulas inside a physical column, how can I get those to update like a virtual column?โ€
โ€œHow can I recalculate formulas with a push of a button?โ€

Up - Update Parent from Child Record
Down - Update All Child Records

MultiTech - Tips & Tricks
https://www.googlecloudcommunity.com/gc/Tips-Tricks/Quick-Update-System-How-to-update-records-in-you...

 

Thank you for your answer!

Unfortunately, this method is not working for me because the referenced rows are not linked with a formula. They are created with a bot like this:

fribo_0-1728302176657.png

fribo_1-1728302212456.pngfribo_2-1728302254728.png

The result of an entry in the parents table would be:

fribo_3-1728302315884.png

And in the childs Table:

fribo_4-1728302359137.png

I tried to create a bot that triggers on the edit of a parent table and executes a grouped action. The first action is 'Delete all child rows,' followed by 'Add Artikel1,' 'Add Artikel2,' and 'Add Artikel3.' While each action works well individually, the 'Delete all child rows' action doesn't work when combined with the others. I also tried delaying the 'Add' actions by 5 minutes to ensure the delete action was completed, but the result is still the same.

I'm grateful for any additional help.

 

 

๐Ÿ™„

one action for each "Artikel"

download.png

Go to actions!! Grouped: execute a sequence of actions

jballester_0-1728316663622.png

and... in the view where we register the new parent

jballester_1-1728317031550.png

To remove parents or childs,  you can follow the same steps
Create a column called Delete of type yes/no
Assign them the value during the action or group of actions and create an automation delete the records yes

jballester_0-1728318529495.png

 

Top Labels in this Space