AnsweredAssumed Answered

Question on how to use dijit/form/select in Arc JS API

Question asked by jjohnson22 on May 29, 2015
Latest reply on May 29, 2015 by jjohnson22

I'm brand new to javascript, dojo and HTML and I've searched everywhere for examples of this and cannot find any.


I have a map with some feature points and a find task to highlight the feature points on the map, and display them in a grid with it's field attributes. This works great when I specify the search field as:


findParams.searchFields = ["LOCATION"];


But if I add:


findParams.searchFields = ["LOCATION", "MODEL_NUM"];


The grid displays results from multiple fields (ie. searching for attributes in LOCATION "A" would also find attributes in MODEL_NUM containing the letter "A"). So I decided to add a drop down menu select to specify which field to search in (one at a time) so the results are more precise.


So I added the following dijit:


<select id="fieldSelect" data-dojo-type="dijit/form/Select" name="fieldSelect">

          <option value="" selected="selected">Select a field</option>

          <option value="MODEL_NUM">Model Number</option>

          <option value="LOCATION">Location</option>

          <option value="NUM_DEFICIENCIES">Number of Deficiencies</option>

          <option value="INSTALL_DATE">Install Date</option>



I then modified the search field statement to:


findParams.searchFields = "[" + "\"" + dom.byId("fieldSelect").value + "\"" + "]";


When I click my search button I get an Uncaught TypeError: a.join is not a function (FindParameters.js:5)


I hope this is enough information. Does anyone have a solution or a recommendation?