Jump to content
  • 0

Trigger Action to update child table


Question

Hi, I am new to Caspio and this is why I need help even though my problem being simple.

I need to set up a triggered action to update a child table whenever any field of the parent table is updated by the user. There is no calculations, nothing complex. I Just need that when the user updates any of the data of a certain transaction record (several fields in the parent table) the triggered action updates the equivalent record in the child table accordingly (even though in the child table there are only fewer fields). 

 

Before anyone asks why I dont consolidate both tables in a View, it is because I have more than 20 tables, and I need to "copy&maintain" certain fields from all records from all tables in a single place/table to do a pivot table report.

Thanks in advance. 

Best, Cesar

Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

The best is yet to prevent redundant data in your table and include those values only in the parent table and then to generate your pivot you can create a view to join your tables and use it as the source of the report page. 

But just to answer your question, when a record is being updated/inserted/deleted in a triggered action that manipulated record gets saved to a temporary table called #inserted. What you can do is to compare the column value from the #inserted table with the actual table value and if changed then update the child table with the same ID field.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...