0
votes

I cannot figure out the right combination of single and double quotes and \ to get this setFormula to work right.

 SpreadsheetApp.getActiveSheet().getRange('F2').setFormula('=query(arrayformula(Master!A:K), "SELECT B, C, D, E, F, G, H, I, J, K where A = '"& 'Select Your Event'!A3 &"' Order By I, J",1)')
1

1 Answers

0
votes

Use \' instead of ' on QUERY function literals inside the SQL argument

SpreadsheetApp.getActiveSheet().getRange('F2').setFormula('=query(arrayformula(Master!A:K), "SELECT B, C, D, E, F, G, H, I, J, K where A = \'"& \'Select Your Event\'!A3 &"\' Order By I, J",1)')