Sum of all related child record

Hi everyone. I have this expression that search the entire related payments table and sums all the payments with a certain description, however, it doesn't update it automatically. I need to open and save the parent record in order for the changes to take place. What would be the best approach in order to have the parent record update automatically after the child record is added.

 

 

SUM(
    select(
       [Related payments][amount], 
       [description] = payment 30 
          )
    )

 

 

 

Solved Solved
0 11 377
2 ACCEPTED SOLUTIONS

hi @casitasrd ,

I get you it happens to me before, you can try create  an action in wich you set the value of the physical column with the formula you just post. 

Then in the UX view set the behaviour action in your Form view of the table to call that action.

ps: set the action asw "do not display"

View solution in original post


@casitasrd wrote:

I would need to create 36 different actions,


not really. You cant change as many columns as you want. and create a condition to filter the row.

hhd.png

 inside the action configuration thers a section call "behavoir" where you can establish your condition.

 

 

View solution in original post

11 REPLIES 11

I see that a virtual column automatically reflects the changes but not a physical one, so i could point my physical column to take the value of the virtual one. Why is that? Why would a virtual column reflect the changes automatically, but not the physical one?

I see that even pointing the physical column to the virtual column, still doesn't reflect the value of the virtual column automatically, still need to edit then save. So basically at this point i would have to change all the column where i want these calculations to happen to virtual columns. Before i dive into these major changes in my app. Is there anyway to make the physical column updates like the virtual one without an action or an automation bot?

hi @casitasrd ,

I get you it happens to me before, you can try create  an action in wich you set the value of the physical column with the formula you just post. 

Then in the UX view set the behaviour action in your Form view of the table to call that action.

ps: set the action asw "do not display"

Hi @Luis_Rodriguez_  thank you for your reply. The thing is that I need to update 36 different columns. With this solution I would need to create 36 different actions, which doesn't make it very efficient.

How do I update only the row that matches the ID of the REF child column that just triggered the event?

Screen Shot 2022-10-09 at 6.19.38 PM.png


@casitasrd wrote:

I would need to create 36 different actions,


not really. You cant change as many columns as you want. and create a condition to filter the row.

hhd.png

 inside the action configuration thers a section call "behavoir" where you can establish your condition.

 

 

Please read the docs

Thank you @SkrOYC for your help. I am reading it and trying many formulas. I don't see anything that shows how to construct a list base on information from the child table row that triggered the event. If you know where i could read for this issue, please share.

I mean read the docs to learn about the platform, not to just solve your particular problem

@SkrOYC I understand what you're saying, but the thing is that not everyone learns the same way. If I read the entire documentation,  by the time I finish, when i's time to do something, I would still have to go back and read about it again. Not everyone retain information the same. I learn different than you buddy. I had a roommate in college where he would just read a whole chapter of chemestry while hangover in under an hr and A the test. I would spend the entire day studying and still fail. If I post something here is because I already spend 1 or 2 hours researching, trying and failing.

I'm a tenis instructor, and I can assure you that some people learn faster than others. For me it was easy, now coding, it's challenging, however, I'm tackling each and every issue, one by one.

By the way, thank you for all your comments and help. You have made me read in more depth about the matter. I truly appreciate all your help.

I'm with you on most of that, even the tennis stuff, I love tennis btw.

Some help:
Define App formulas and Initial values - AppSheet Help

Top Labels in this Space