Hi all,
I have seen many questions asked about updating a parent based on child data or vice-versa, but my question is how can I update 1 child based on data in another child.
The use case is this: We have a customer table, these customers can have 'Customer Items' (Child 1) and for those items there can be 'Customer Pipeline' (Child 2).
When a customer pipeline has "added to inventory" (Y/N Column set to TRUE) the [total quantity] in the pipeline (Virtual column) must be added to the [Quantity] in the Customer Items table.
Eg: Customer Items Qty = 500 , Pipeline Qty=1500, after the pipeline is added to inventory the new Qty in customer items should be 2000.
The pipeline is a child of the customer items table but is also reffed to the overall customer table. I have some screen shots below of my tables.
Customer Table is the Main Table in the App.
Any Ideas on how to achieve this is really appreciated! Thanks
Relationship Diagram
Pipeline Table
Items Table
@Thilina_Wick wrote:
I have seen many questions asked about updating a parent based on child data or vice-versa, but my question is how can I update 1 child based on data in another child.
@Thilina_Wick wrote:
pipeline is a child of the customer items table
So in other words, it actually is the exact same situation. Customer Item is the parent that you need updated when the pipeline child is updated.
All existing questions/answers about the topic should still be relevant.
User | Count |
---|---|
32 | |
11 | |
3 | |
3 | |
2 |