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";
}
}
OnEditis not a reserved "simple trigger" function name, whileonEditis. There are also some syntax errors that should prevent your script from even saving. - tehhowchonEditi'll update my post to reflect the correct capitalization and other changes i made. however, my script saves and runs fine, but i have to manually run it. it does not automatically trigger on edit. i even triedonChangeand it does not work on my PC unless manually run. at least the onEdit works automatically on my PC - que syrah sarahonEdittrigger works on mobile! might have been activatingDeploy as API executableand it just took a few hours to apply? Not sure what worked, but now theonEdittrigger works and I'm getting emails from Google Sheets with fail reports. Not sure why it's sending me fail reports when the trigger is successful, but I'm not going to complain now that it works! - que syrah sarah