How to get scripts to work with phones and tablets

Yuzhy picture Yuzhy · Jun 1, 2012 · Viewed 15.5k times · Source

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!

Answer

Eric Koleda picture Eric Koleda · Jun 4, 2012

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.