AnsweredAssumed Answered

query.where clause using variable for field name instead of hard coded

Question asked by schlot on Oct 11, 2013
Latest reply on Oct 11, 2013 by cblinnmrc
I'm sure if it wasn't Friday afternoon, I'd figure this out on my own.

I am trying to set up a more generic function to construct and execute a query task.   Instead of having my query.where clause be something like
selQuery.where = "DISTRICT= '" + myCode + "'";  //myCode coming from a FilteringSelect value


I'd like the field name to also be a variable.  But I think the syntax for the where clause needs to be in the form of "FIELDNAME" = 'myValue', and I'm not quite sure how to get the quotes properly formatted in the string. 

Please someone who's brain is still functioning, help me out!

Outcomes