2

I'm writing scripts for a google docs spreadsheet that run when cells are edited using the onEdit function.

So far it performs things beyond what spreadsheet functions can achieve such as:

  • Validates all data based on where they are entered
  • Provides mechanism for protecting cells that are not supposed to be modified
  • Logs date and time data is entered (the user part doesn't work properly though)
  • Checks for duplicate entries and warns accordingly
  • Applies number formats (beyond the limited choices available from the menus)
  • Applies conditional formatting (No limits!)
  • And much much more

However one problem I find is that when cells are edited from mobile browsers such as from an iPhone or andriod tablet, the scripts do not work?

According to wikipedia:

Google Apps Script is a cloud based scripting language for light-weight application development in the Google Apps platform. It is based on JavaScript,[2] however instead of running on the client, it gets executed in the Google Cloud.

Is there something I am doing wrong or is there another way to set up my triggers so that my scripts will be run even when someone enters data from a mobile browser?

Thanks!

TheMaster
  • 45,448
  • 6
  • 62
  • 85
Yuzhy
  • 21
  • 1
  • 1
  • 2
  • From my experience on an Android 4 tablet and Firefox all my scripts (well I probably did not test everyone of them but a lot ) work when showing up in normal desktop mode. Do you have problems only with onedit triggers ? or more generally ? – Serge insas Jun 01 '12 at 15:52
  • Ah desktop mode! Thanks, I will look into it! – Yuzhy Jun 03 '12 at 04:38
  • 1
    Apparently google spreadsheet reverts to a special mode when accessed by mobile browsers? You can even see it from a computer by replacing "ccc?key=ID" with "lv?key=ID". In this mode scripts don't run! – Yuzhy Jun 03 '12 at 04:42
  • How annoying... I noticed the input mechanism for mobile browsers is quite unique. Users hit EDIT on the left of a row to add data and then SUBMITS when they have finished typing. Perhaps there is a trigger for when the SUBMIT button is hit I can utilize such as onMobileSubmit...? – Yuzhy Jun 03 '12 at 04:59
  • Okay I downloaded a browser called Dolphin for the iPhone, enabled desktop mode and the scripts work now! – Yuzhy Jun 03 '12 at 08:02

1 Answers1

6

On edit triggers aren't fired when a row is edited in the mobile view. Clicking the link "Go to spreadsheet view" will open the full spreadsheet editor, where triggers will fire. There may be technical complications that make it impractical to have triggers work in the mobile view, but you can create feature request for it on the issue tracker.

Eric Koleda
  • 12,420
  • 1
  • 33
  • 51