Bot seems to fail somes conditions in Nested Table

Hi All, 

I have a child nested table in parent detail view. I have a bot set to update all the Balances to the related rows in the child table when you add/delete/update a row in the child table. For some or other reason the bot only works on adds. So if you add a child row then all the balances update, but if you delete a row or update a row nothing happens to the other rows. 

PS. I know the balance isnt a normal running balance in this example, but its more the principal I am trying to figure out, why isnt the bot working for deletes/updates. 

 

Untitled.jpg

Solved Solved
0 9 193
2 ACCEPTED SOLUTIONS

Aurelien
Google Developer Expert
Google Developer Expert

There is probably something we missed here.

Can you describe how the status value is updated?

From your screenshot, it seems the value switches to TRUE...but never gets back to FALSE, so it can't trigger any bot anymore. Am I correct? Is there a possiblity for it to get back to FALSE?

Aurelien_0-1739810892352.png

 

View solution in original post

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Aadam 

I think you can make it simple, without any bot. Here are two options.

These two assume you have, for example, a table ORDER and a table ENTRY.

And that the table ENTRY has a column named "ORDER" that refers to the table ORDER.

Aurelien_3-1739857558367.png

 

1) use virtual columns:

in your parent table, create a virtual column, let's name it [_sum] and use this expression:

 

SUM([Related ENTRYs][amount])

 

It's calculated on the fly, so there is no need to update anything.

Keep in mind it exists only in AppSheet, but not in your database.

2) use of real columns:

- create an action "update_sum_amount" in your parent table, and set the expression you need (I think you already have it). It could be:

 

SUM([Related ENTRYs][amount])

 

Aurelien_0-1739857323407.png

- create an action "call_update_sum_amount" in your children table, which will be of type "Data:execute an action on a set of rows", for the referenced rows:

 

LIST([ORDER])

 

Aurelien_1-1739857392112.png

- call this action on the event form of the new entry:

Aurelien_2-1739857462201.png

 

View solution in original post

9 REPLIES 9
Top Labels in this Space