I've perused the forum and haven't found any definitive answers (other than to write an Android script, but I have an iPhone). From what I've read on this wonderful forum, the onEdit and onChange triggers should work on the mobile app.
My script works fine when I use the desktop app. However, when I use the Google Sheets mobile app, the scripts do not run. How can I get them to run?
This solution was to create an Android add-on, but I have an iPhone. Maybe this is a stupid question, but can I run an Android add-on on my iPhone Google Sheets mobile app? I'd assume no since the OSs are incompatible, but weirder things have happened.
This solution says to change the simple onEdit
trigger to an installable one. What is an installable trigger?
This solution says to create a web-app using Google's Execution API. Not sure how to do this.. I thought I already did. Within script editor> Publish
> Deploy as web app
. I've also done Publish
> Deploy as API executable
. Am I doing something wrong?
Does this mean scripts just don't work on the iOS Google Sheets mobile app?
My script:
function onEdit(){
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("pss");
var lr = ss.getLastRow();
var range = ss.getRange("A2:J" + lr);
var vlst = range.getValues();
range.setValues(vlst);
var i,j,a,find,repl;
for (var i = 0; i < vlst.length; i++){
for (var j = 0; j < vlst[i].length; j++){
a = vlst[i][j];
if (a == find) vlst[i][j] = repl;
find ="sun";
repl ="sunshine";
}
}