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 192
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

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Aadam 

- If you use Security Filters, did you try enabling this option?

Aurelien_0-1739771373033.png

- if you use a false/true operation to update a value, did you enable the option "trigger other bot" in your bot options ?

Aurelien_1-1739771515247.png

 

Hi @Aurelien thank you for your response. 

I have tried enabling both buttons as you suggested, but still not working as expected. 

I have a few bots which are working without bypass etc. there are no security filters. 

Having problems with Bots today. When you add data which matches conditions a STATUS column updates to a new value, but if you go back and remove the data you just put in and save the row again and even a few times open and save, it does not update the STATUS value back again

 

 

 

 

 

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

 

Hi Aurelien, 

I initially had a reset action, but then I noticed that extra lines were getting added, it was like it was interfering/and causing duplicates, it was very confusing so I disabled the automation. 

This evening after reading your suggestion I tried it again, and it seems to be working as expected. This is what I did in below screenshot...

1.jpg

I have a few actions for sending statements etc that I notice sometimes work when you trigger the action button inline in detail view and sometimes dont, is that the norm that if you dont have almost like a "reset to initial value" for an action then it cant repeat itself? (Although they normally seem to eventually reset somewhere down the line perhaps through a few updates in the referenced rows etc. would be good to have some finer detail instructions on how actions reset etc)

But also I noticed what also worked is instead of two actions, one action which set value of column [REFRESH] to "AWAKE", and in the same action set the value of column [REFRESH] to "GO BAACK TO SLEEP" then only having one process in the Bot vs two procecess...do you forsee any problems in either, both seem to initially be giving the same expected result? 

3.jpg

 

vs One action and one process;

2.jpg

PS @Aurelien thanks for applying yourself to my challenge, was very helpful!!

But using either of the two options above does not seem to update PARENT Table when Related Child table in Detail view is updated, it needs another manual hit of the action....this is where I get confused alot of the time, but when you update the Child table in the FORM view then the action seems to work and cause an update in the PARENT Table, whether this is the action working or an innate difference between the Nested table in the Detail View vs the Form View I dont know.         @Anybody know? Or I guess the nested table in form view is getting the save on the Parent table after edit so that is causing the refresh, but how to structure action...

Below is what I have for the Parent to update, but its not triggering or working after changes made in the nested table in detail view...

4.jpg

 

 

Sorry I figured out this issue, the actions are causing the row to save correctly, but the column I to update is only an initial value column with no reset on edit. It updates with a bot process when events unfold. I need to work out how to start this process from the child table (after some sleep)

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

 

@Aurelien thank again, that did the trick, I had an existing virtual column that I used, and an existing action just needed to add that final execute an action on set of rows, and change the form view event action. 

Thank you!!!!!!! 

Top Labels in this Space