0

I Have this query but I can filter based on only one condition, looking for multiple conditions. Currently, it is filtering on Project ID but I also want to filter based on order ID. Following is my app script code:

function getFrenchContacts() {
  var firebaseUrl = "https://test-dump.firebaseio.com/";
  var base = FirebaseApp.getDatabaseByUrl(firebaseUrl);
  var proj = SpreadsheetApp.getActive().getSheetByName('Enter project ID').getRange('B1').getValue();
  var queryParameters = {orderBy:"order_id", equalTo: 86092};
  var data = base.getData("", queryParameters)
  var sheet = SpreadsheetApp.getActive().getSheetByName('Fetch');


sheet.getRange('A1').setValue(JSON.stringify(data).substring(0, 50000));

}
  • Realtime Database doesn't have the capability of querying using multiple conditions. You will need to work around this by constructing your data differently, as described in the duplicate. – Doug Stevenson Apr 17 '20 at 17:35
  • Okay but please help me in parsing the text in a sheet. Currently, I'm entering the results in a single cell that is A1. How to split the data into other cells accordingly? – Mohammed Zaid Apr 18 '20 at 15:42
  • If you have another question, please post it separately. – Doug Stevenson Apr 18 '20 at 16:43

0 Answers0