Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

button click is only working on Windows & not working on Android mobile sheet

I have created an image button in Google spreadsheet and have assigned function, to perform some action. But this button click is only working on windows and not working on Android mobile sheet or mobile browser. what is a workaround for this issue?

like image 607
PK Inception Avatar asked Sep 08 '19 09:09

PK Inception


People also ask

Why is my button not working on my PC?

Dust, dirt, hair, and other debris can fall into the keyboard over time and obstruct a key's movement or interfere with its circuitry. Try removing the key that isn't working, and clean the area under and around it.

When I click on my Start menu nothing happens?

Press Ctrl + Shift + Esc to open Task Manager. Select the Processes tab. Right click then select Restart. **Please try to run SFC and DISM to check for any system errors and corrupted files.

Why is my mouse not clicking on the taskbar?

You may be facing this issue due to the presence of corrupted files & folders or some of the missing system files on your PC. Sometimes this may be a temporary issue as well. Method 1: I suggest you to reboot the computer and check if the issue is resolved.


1 Answers

Workaround is to use checkboxes(say, in F1) instead of buttons/Images. Then hook your function, that is supposed to run on button click to a trigger function like onEdit().

Sample script:

function onEdit(e){
  const rg = e.range;
  if(rg.getA1Notation() === "F1" && rg.isChecked() && rg.getSheet().getName() === "Sheet1"){
    callFunctionAttachedToImage();
    rg.uncheck();
  }
}

Some limitations of this workaround in mobile app is described here.

References:

  • Class Range
  • Event Objects
like image 182
TheMaster Avatar answered Sep 20 '22 00:09

TheMaster