Jump to content
  • 0

Need Parent Data in Child Table


Rupesh

Question

I have two tables one is Parent and another is child. Parent has more columns than Child and Parent doesn't has unique id as well. In parent there are same oder id listed as multiple times with amounts for different products. So i need only one Order Id with sum of amount of all the products in child table. 

 

Please suggest how to achieve that

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hello @Rupesh,

Usually, it is a parent table that stores unique values, and a child table that stores multiple values that refer to the unique value from the parent table. 

If you have a child table like this:

zlcwmIu.png

And you need to calculate and store the amount of the each order in the parent table like this:

8dIajwl.png

Then it should be possible to do with a Triggered Actions.

Triggered Actions https://howto.caspio.com/tables-and-views/triggered-actions/

Caspio Labs: Popular Examples of Triggered Actions https://www.youtube.com/watch?v=w6T1cqg0gnk

The Trigger design depends on your workflow. It depends on the actions that are allowed to the end-users (the data can be inserted, updated, deleted), etc. 

 

Fell free to update this thread if you need further assistance. 

Link to comment
Share on other sites

  • 0

If I understand your setup correct, you have multiple records on the Parent table with the same order orderID. What you want is that on the child table, get only the Unique orderids from the parent table with the aggregated value.

Is that the case?

If yes, from the looks of it, its more like that the child table is the parent and the parent table is the child.

Anyway, You will need a task like this:

5754676 

In my sample, the child table there is the demo_table2

I hope this helps

Link to comment
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...