Hello everybody!
I need your help!
I need to clear data from a column on my table.
How can I do that ?
Solved! Go to Solution.
But, itโs desition needs so long time.
And few weeks ago I have make this:
I have collect my data in to Google Apps Script.
From GAS, I have make this script:
function clearMarked() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Animals")
var data = sheet.getDataRange().getValues();
var col = data[0].indexOf("ะะตะปะณััั");
var numRows = sheet.getLastRow() + 1;
var range = sheet.getRange(2, col+1, numRows);
var result=range.clear();
var date = new Date();
Logger.log(date.toString());
return date.toString();
}
function doGet(request) {
var result = clearMarked();
return ContentService
.createTextOutput(result)
.setMimeType(ContentService.MimeType.TEXT)
}
In appsheet I have make
button with action that call my GAS API
HYPERLINK("https://script.google.com/macros/s/ID/exec","")
Now my reset button clear marked data in few seconds.
After press this button I need just reload my app
Easiest way - clear it in the data source.
Right now I am doing like this )
But itโs not comfortable. Every time to go on data source and delete.
I want to add users, they canโt do that
If your data source is Gsheet, you can do it using a script and a webhook or a timed trigger.
Agree with you. In prototype mode my users can do webhook ?
No, only when deployed.
You could do this with actions and a scheduled report.
I was trying to do, but couldโt find. How can I do that ?
Help me pls )
Experiment a little and let us know what you come up with.
Thank you for a link. Itโs helpful.
But when I am trying to use them there no effect.
I have action that I am use for marking. I am just copy this action and just change name and value to FALSE.
After that I am use type of action execute an action on a set of rows for my target table.
Make this query for select empty and market for true rows
Filter(Animals, AND([User]=Useremail(), OR(ISNOTBLANK([Mark]),[Mark]=true)))
Finaly use my action.
When I press my bulk action button nothing change. Why? And how can I found my error ?
Picture of my action
Should this:
OR(ISNOTBLANK([Mark]),[Mark]=true))
instead be this:
AND(ISNOTBLANK([Mark]),[Mark]=true))
Itโs help. Working fine! Thank you very much!
But, itโs desition needs so long time.
And few weeks ago I have make this:
I have collect my data in to Google Apps Script.
From GAS, I have make this script:
function clearMarked() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Animals")
var data = sheet.getDataRange().getValues();
var col = data[0].indexOf("ะะตะปะณััั");
var numRows = sheet.getLastRow() + 1;
var range = sheet.getRange(2, col+1, numRows);
var result=range.clear();
var date = new Date();
Logger.log(date.toString());
return date.toString();
}
function doGet(request) {
var result = clearMarked();
return ContentService
.createTextOutput(result)
.setMimeType(ContentService.MimeType.TEXT)
}
In appsheet I have make
button with action that call my GAS API
HYPERLINK("https://script.google.com/macros/s/ID/exec","")
Now my reset button clear marked data in few seconds.
After press this button I need just reload my app
Hi Sayan,
I tried your script with minor modification for my purposes, and it works fine from the Google Sheet. However, Iโve not been able to create the button on my AppSheet app, so can you please explain that part step-by-step? Iโm very new to all this, so please make it simple!
Thanks and regards,
Happy Holidays!!
You need just make button on the behaiov menu and select action to open URL
User | Count |
---|---|
17 | |
12 | |
5 | |
5 | |
5 |