Edit column in another table with value from the updated table

Hi,

I have tables Product and Order. Lets say I have a row in table Product for product Cake and lots of rows in table Order as people ordering the cake. Everytime another row is added into table Order I need to update a column in a row Cake in table Product with the value from the added row in Order. So the column in table Product always works with the value of latest cake row in table Order. How can I do that?

I tried to do it with an event triggered after insert into Order table, but I am loosing reference to the added row when trying to Edit row in table Product. The Edit function is always referenced to the Product table, not the one that caused the trigger.

Thank you in advance!

Vaลกek

Solved Solved
0 2 182
1 ACCEPTED SOLUTION

You will want to look at using the INPUT() function.  This was specifically designed to allow passing of values between actions but also has other uses.

In the action that needs to receive the updated value you would assign your column with an expression like: INPUT("updated value","")

Then in the action that needs to send the updated value use the action above as the "Referenced Action". When you do, a new Add button will appear below this "Referenced Action" property.  Tapping it will show a list of available variables you can use (in this only the one).  Select it and then assign it the proper expression of the value to send - usually just the column with the updated value.

These actions can either be included as part of a Bot or attached to the Form Save behavior on the input Form View.

I hope this helps!

View solution in original post

2 REPLIES 2

You will want to look at using the INPUT() function.  This was specifically designed to allow passing of values between actions but also has other uses.

In the action that needs to receive the updated value you would assign your column with an expression like: INPUT("updated value","")

Then in the action that needs to send the updated value use the action above as the "Referenced Action". When you do, a new Add button will appear below this "Referenced Action" property.  Tapping it will show a list of available variables you can use (in this only the one).  Select it and then assign it the proper expression of the value to send - usually just the column with the updated value.

These actions can either be included as part of a Bot or attached to the Form Save behavior on the input Form View.

I hope this helps!

You are my best!!! Thank you for help. I originally misunderstood the INPUT function. It makes sense to me now.

Again, thanks a lot!

Top Labels in this Space