I have a data validation input (dropdown) on GSheets with a range of values from another sheet, in the same file, (ex: Sheet1!A2:A40 )
What I'm trying to is to cycle through all 40 options of that dropdown using a time-based trigger. Let's say the script will run at every 5min, changing the dropdown to the next option until it has finished all the 40 options.
Finally, this routine will run on a weekly basis, said Monday, for example...
Right now, I'm stuck trying to change the dropdown options ...
Any suggestions?
Incrementing DataValidations through All Possible Choices
This function will increment the options selection for every DataValidation in the spreadsheet (i.e. all sheets) where it's criteria range is A2:A40. It will do it for the height of the criteria range and then it will set the Property ENABLEOPTIONSCHANGE to FALSE which will inhibit any further changes until it is set back to TRUE by calling enableAllTheOptionsChange(). So first you must trigger enableAllTheOptionsChange() and then you can trigger changeAllTheOptions() upto the height of the A2:A40 which is 39.