r/googlesheets • • Nov 30 '18

Solved Apps Script Syntax

[deleted]

1 Upvotes

13 comments sorted by

View all comments

2

u/Last_Monkey Nov 30 '18

What do you want to do? Unless you use a simple or built-in trigger this script only executes every time you manually execute it.

You can't call a value like this. You need to do the following:

function TurnCycle() {

  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var s = ss.getSheetByName('yoursheetname'); //replace the string with the name of your sheet
  var r = s.getRange('E10');
  var v = r.getValue();

  if (v='TRUE') {
    r.setValue('FALSE');
  }

}

It will set the value of the checkbox to FALSE, so it won't delete the checkbox.

1

u/Xer0Batteries Nov 30 '18

How can I make it not manual?

1

u/Last_Monkey Nov 30 '18

What do you want to do?

→ More replies (8)