How to set up a QueryTask/Search using domain descriptions?
I am a little stumped. I have many fields which utilize domains, and users will see a text value like 12-C3 in a field when the underlying value is actually a number like 14. I have a custom search tool that takes their search string and plugs it into a where clause and executes a QueryTask against the service. That user has no knowledge of the coded value for that field, they will be searching for 12-C3, and 12-C3 is what is going into the QueryTask where clause (and causing it to fail) if I am passing a variable as search criteria.
How can I get the QueryTask to see my where clause input as the description and not the coded value? It seems like I would have to query the GDB_ITEMS with the users value and find the corresponding code before I could assemble my where clause for the query task - this is WAY too much overhead.
In ArcMap (which I am well aware is a different animal) you can search for attributes with the domain description and it doesn't throw up on you. Is there any ESRI search tool I can use with GCX in a workflow that will provide this seamless search capability?
Any ideas about how I can structure this?
0
-
You can use the Get Coded Value Domain activity to create a dictionary with value/description pairs. You can look for the description in the dictionary to get the corresponding value. 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
1 kommentar