Find the cell changed via app

Hi guy,
when I change a field of a sheet record via app (Ex. name) I need to undestand the exact cell (not row) that is changed in the sheet and compare the new cell value with an other sheet (same spreadsheep) column field and if true call a my function in apps script.
How can I do it?
I tried to use OnChange but I canโ€™t find the cell changedโ€ฆ
Thanks

0 7 352
7 REPLIES 7

Youโ€™d need to check the [_THISROW_BEFORE] values against the current value for every column. Hereโ€™s a handy template generator for such a thing.

Thankyou Marc for the answer.
I must have just confused in my ask. Sorry.
My issue is to launch a my function in apps script when I changed a field in my appsheet. With OnEdit function Itโ€™s ok when I change the field directly on the sheet but it doesnโ€™t go when I change it in the app.
Is there a method for this?
Thanks

Thanks Steveโ€ฆ Iโ€™ve just seen time trigger but it canโ€™t do what I need. I need a simultaneous launch of my function because it complete other sheet fields .
Thankyou anyway.

Appsheet doesnโ€™t edit individual cells, it always updates entire rows at once. As such, a GAS will not have access to the actual cell edited, only the row. You need to depend on Appsheet to determine which values was changed, and you can do that using the #tips thread I posted earlier.

Ok Marc but how can I know in apps script function that a chance accours in a row via app sheet without time trigger?
Thank you

  • Have Appsheet enter records in another Table, detailing the change. Have your GAS trigger on that Table.

OR

  • Web-deploy your GAS and provide a doPost() function. Have Appsheet send a webhook directly to your GAS with the required information.
Top Labels in this Space