Good Evening,
I have my data in google sheets with my code listed below. On sheet "Projects" for example I getRange 'B1:F500' thanks to earlier advice. Column F contains 1 or 0 (no nulls) in the cells, how do I only return the columns where column F only = 1? I am looking to apply the same to the other tabs.
function doGet(e) {
if ( e.parameter.func == "static" ) {
var ss = SpreadsheetApp.getActive();
var shProj = ss.getSheetByName("Projects").getRange('B1:F500').getValues(); **// where F=1**
var shHier = ss.getSheetByName("Hierarchy").getRange('B1:F2000').getValues();
var shFlr = ss.getSheetByName("Floors").getRange('B1:C300').getValues();
var shRm = ss.getSheetByName("Rooms").getRange('B1:C500').getValues();
var shCnd = ss.getSheetByName("Condition").getRange('B1:C50').getValues();
var shSts = ss.getSheetByName("Status").getRange('B1:C50').getValues();
var shRfg = ss.getSheetByName("Refrigerant").getRange('B1:C300').getValues();
var shAcs = ss.getSheetByName("AccessE").getRange('B1:C50').getValues();
return ContentService.createTextOutput(JSON.stringify({"Projects":shProj,"Hierarchy":shHier,"Floors":shFlr,"Rooms":shRm,"Condition":shCnd,"Status":shSts,"Refrigerant":shRfg,"AccessE":shAcs,})).setMimeType(ContentService.MimeType.JSON);
}
Many Thanks