Find/Query Feature Layer with an array of values

782
1
01-03-2012 12:08 PM
ChadWilcomb
New Contributor III
I currently have a simple example working where I can enter a string into a text box and return the features where that string matches a field from an ArcGIS REST service using the FindTask function. It works great.

Now I want to be able to query my REST service with an array of strings and show the features in the map that match the string for a certain field. What is the best way to go about this?

Thank you,

Chad
0 Kudos
1 Reply
ChadWilcomb
New Contributor III
I found a solution so I wanted to update my post:

I am using the QueryTask function and passing a query string with the IDs that I want into the query.where parameter. So my REST service call looks like this:

http://myserver/ArcGIS/rest/services/GISAPP_MOSAICSPERMITS/ActivePermitsQuery/FeatureServer/1/query?...

Initially my map service was returning the JSON without any geometry. If I check the 'Feature Access' capability in ArcGIS Server Manager and use the /FeatureServer/ URL, then the JSON includes the geometry and my application is working. Is it necessary/recommended to use the Feature Access in order to return geometry in the JSON (this is probably a separate forum post)?
0 Kudos