Add data to another table into existing row

Hey guys, i need your help

I'm currently making an application about borrowing tools from the warehouse. 

I have 2 tables which are "Warehouse" and "Checkout". "Warehouse" is a table of tools that can be borrowed. And "Check Out" is a table to record and track who borrowed tools from "Warehouse".

"Warehouse" has three column [serial_number], [item], [amount]. App converts value of [serial_number] to a QR code. While "Checkout" table has four column which are [serial_number], [item], [amount] and [last_stock]. 

[serial_number], [item], [amount] are ref type from "warehouse" and [last_stock] has formula [Amount]-1. 

is there a way the [last_stock] value is also copied to the [amount] column in the "Warehouse" table when the user borrows the tool?

thank you very much for your help.

cc @Steve

0 2 124
2 REPLIES 2

Aurelien
Google Developer Expert
Google Developer Expert

Hi @alhazen 

 

"when the user borrows the tool?" ==> this involves a form, I presume.

You may want to combine:

Event action "form saved", such as below

Aurelien_0-1654229946667.png

 

and use an action that is of type: "Data:execute an action on a set of rows", like the example below.

Aurelien_1-1654230019612.png

 

This has been asked many times but I could not retrieve one where I described specifically the above question. Here is a similar post though: ๐Ÿ™‚

https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/When-the-form-is-saved-I-want-to-change-a-recor...

For reference, I suggest you read this:

View events

FILTER() 

Hey, thank you for your feedback.

I will check these out