From the appsheet builder:
-go to Data / Columns
Find the column STOCK , and in the Formula column paste this [QUANTITY]
now press “Test” and check if the expression is giving you the desired value (whihc it should, unless the QUANTITY column is empty
if the test is all okay proceed with below:
creat a temporary column in your sheets where the STOCK column is , lets say “test”
from the app builder , behavior, Action / Creat new Action
Action name: Action Refresh STOCK
For a record of this table: the table name where the column STOCK is
Do this: Data: Set the values of some columns in this row
Set the Columns: STOCK = [QUANTITY]
Appearance / Prominence = Do not Display
Now creat another Action:
Action name: Refresh STOCK
For a record of this table: the table name where the column STOCK is
Do this: Data: Execute an action on a set of rows
Referenced Table: the table name where the column STOCK is
Referenced Rows: FILTER(“Table Name”, ISNOTBLANK(QUANTITY))
Referenced Action: Choose the first action you have created in the previous step.
Appearance / Prominence = Display as primary
Now save the changes, refresh your app, go to your application, go to that view, select a row and press on the action you have created, and wait for the sync, after the sync is done, you shall have the values of all the records in your real column in sheets, and for the newly added rows, it shall be there automatically registered. then you can either delete these two actions or keep it for other uses.
Another workaround of above, is to create an action on that table of type: APP: export this view
-Export the view
-VLOOKUP the values into your real column STOCK
in both ways, for newly added rows , it shall automatically pull the QUANTITY in the VC into the real column in sheets as you have added that into the formula column in the app builder