Working with associations

Hi everyone, I´m currently having problems trying to figure out how to make this and maybe one of you could help me. I would really appreciate it. So I´m currently trying to associate some customers orders with their faults. So one order can have multiple faults. At the end I want to se how many faults I have for a priority level. It should look like this : (this is what I aim to have). One problem that im facing is that im trying to put a column of the faults in the Customer Order Page Overview, but it doesn´t show an option when I click on select attribute(maybe because it is a parent?). Then this is what I currently have.
2 answers

One approach could be to put some attributes in your Customer_Orders entity to hold these values. You could then add some Before Commit and Before Delete microflow actions on the Fault_List entity to retrieve the Customer_Orders entity and then retrieve all Fault_List entities associated with that. You can then count up the priority of each and commit them in Customer_Orders.


I would use the custom string widget:

Then you can use a microflow as the source of the result. Depends a bit on your page build. You do not want this microflow fire for hundreds of lines. Then Robert sollution is better.