function saveButton() {
var ss = SpreadsheetApp.getActive();
// [START modifiable parameters]
var sourceRange = ss.getRange('Active Jobs!A2:F2');
var targetRange = ss.getRange('Active Jobs!A3:F3');
// [END modifiable parameters]
sourceRange.copyTo(targetRange);
ss.toast('Data copied to ' + targetRange.getSheet().getName() + '. ' +
'To undo, press Control+Z (on a Mac, ⌘Z).', 'Action button - Save');
var ss = SpreadsheetApp.getActive();
// [START modifiable parameters]
var rangeToClear = ss.getRange('Active Jobs!A2:F2');
// [END modifiable parameters]
rangeToClear.clearContent();
ss.toast("Cleared range '" + rangeToClear.getSheet().getName() + "'!" + rangeToClear.getA1Notation() + '. ' +
'To undo, press Control+Z (on a Mac, ⌘Z).', 'Action button - Clear');
rangeToClear.activate();
}
Adding this two lines did not help:
var button = ss.getRange('Active Jobs!G2');
button.activate();
Intention was to move the focus out of F2 cell.
I have also tested:
SpreadsheetApp.flush();
and:
ss.getRange('E2').activate();
Intention was to store the last entered cell value before copy the range but nothing worked.
As you see in the screenshot the value does not post from GUI to backend.
For me it looks like you have managed it yourself : )
Thanks for letting me in :)