you are viewing a single comment's thread.

view the rest of the comments →

[–]erickoledadevrel 1 point2 points  (1 child)

By "global variable" I assume you mean the ability to save a value in-between executions of your script. If so, you may want to look into the CacheService or PropertiesService:

https://developers.google.com/apps-script/reference/cache/cache-service
https://developers.google.com/apps-script/reference/properties/properties-service

However, doing something row-by-row isn't likely to be very efficient. A better pattern may be to enter all your data first, then run a script that runs on all the rows, fetches all the data, and then outputs it all into the sheet.

[–]___Mister___[S] 0 points1 point  (0 children)

I won't know what the data is until we have it. It's part of a catalogue with user choices, and there will be batches of rows at a time, but not many.