AnsweredAssumed Answered

query.where syntax issue

Question asked by thebillcarr on Apr 9, 2014
Latest reply on Apr 10, 2014 by jeff.pace
2 part question:

The first part is getting the value of
  <select class="field" name="field" id="selectfield">        <option value="FIRSTNAME">First Name</option>   <option value="LAST_NAME">Last Name</option>   <option value="Service_ID">Service ID</option>   <option value="TOWNSHIP">Township</option> </select>


to be a variable in a query.where

var sel = dom.byId("input1").value; query.where = "  (select option variable) LIKE'" + sel +"'"; 


Essentially we need the user to select the query field in from the drop down menu. I'm hoping this is possible and I'm just running into syntax issues.

The second part is making the query accept partial or misspelled text inputs. I'm new to JS and this is really racking my brain. Any help is appreciated.

Outcomes