Utilize a Domain for a Query Layer in ArcGIS

2869
3
Jump to solution
02-01-2016 10:01 AM
Labels (1)
BrianO_keefe
Occasional Contributor III

I'm using the ESRI "Web App Builder for Developer" and Robert Scheitlins "Enhanced Query" widget.

I'm trying to create a map that allows users (mostly police officers) to select a Crime Code (of which there are 210). This map is going to display all incidents (of which there are over 300k+ records), so when I attempt to choose the [Unique] option in the question it can take “minutes” to return the unique selection of options.

This particular widget allows users to choose [Predefined] instead and hand type each option in, but that is so massively time consuming I think it would be backfired as well. I was told by Mr. Scheitlin to add a Domain to that field but… I this layer is a Query Layer, not a straight Feature Class, and I am brand new to them. The GIS Coordinator said we needed to move over to Query Layers for a variety of internal operations reasons. Which puts me in this position.

I am unfamiliar with how to add a Domain to a field in a Query Layer. I’m not even sure it’s possible.

Being relatively new to the whole Query Layer I am at a loss.

One of the fields within the query layer references the table with all Crime codes, and I have an *.xls file with all crime codes in it ready to be added as a Domain should Query Layers be similar enough to Feature Classes to allow this. I just don’t know how to accomplish it.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Brain,

   With eSearch 1.3.0.1 you can now specify user defined values and labels so I would use that now. I advised you to use a domain be cause you could not specify a label and different value for that label using user defined in previous versions. Because you are using Query Layers your best option it to use user defined values and add all 210 codes to the user defined list. As 210 code is quite a bit I would recommend you entering a few using the Widgets config GUI then opening the config_Enhanced Search Widget.json in notepad or notepad++ and adding them there when you can copy and paste from your document that has the source list of codes.

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus

Brain,

   With eSearch 1.3.0.1 you can now specify user defined values and labels so I would use that now. I advised you to use a domain be cause you could not specify a label and different value for that label using user defined in previous versions. Because you are using Query Layers your best option it to use user defined values and add all 210 codes to the user defined list. As 210 code is quite a bit I would recommend you entering a few using the Widgets config GUI then opening the config_Enhanced Search Widget.json in notepad or notepad++ and adding them there when you can copy and paste from your document that has the source list of codes.

BrianO_keefe
Occasional Contributor III

Thank you kindly.

0 Kudos
RudoDuncan
New Contributor II

Hey Brian I am having the same issue with the department I am with. We have a lot of Radio Codes, Robert told me that I should try and write a python script that will look through my table and put them in my Radio code field. Still trying to figure that part out.

0 Kudos