Search with in Coded value domain using FindTask

277
4
Jump to solution
08-23-2019 10:06 AM
NaveedAhmed2
New Contributor III

Is it possible to use FindTask to search within descriptions of coded value domain? In the code snippet below I am referring a field of integer type that uses CVD. When I input the value for example 2 or 5 it returns the results but when I try to input string like 'Bike Valet' it does not return anything.

// Create a FindTask pointing to a map service
var find = new FindTask({
url:
"https://services.maps.arizona.edu/pdc/rest/services/DayGato/MapServer/"
});

// Set parameters to only query the Counties layer by name
var params = new FindParameters({
layerIds: [53],
searchFields: ["RackType"]
});

Codepen can be found here

0 Kudos
1 Solution

Accepted Solutions
RaviDhulipudi
Esri Contributor

Hi Naveed,

Provided sample code in an attachment to retrieve the domain information using QueryDomains call. There might be other workarounds. I haven't spend much time, so please feel free to change the code according to your requirements. 

View solution in original post

4 Replies
NaveedAhmed2
New Contributor III

If this is not possible directly then could you please suggest some workaround for this.

0 Kudos
RaviDhulipudi
Esri Contributor

Hi Naveed,

Provided sample code in an attachment to retrieve the domain information using QueryDomains call. There might be other workarounds. I haven't spend much time, so please feel free to change the code according to your requirements. 

NaveedAhmed2
New Contributor III

Thanks Ravi

0 Kudos
RaviDhulipudi
Esri Contributor

Glad it worked!!

0 Kudos