Hello everyone and thanks for looking at my post.
I have a scenario where I need to use the Collector or ArcGIS app for data collection. Essentially what I'm struggling to figure out is how to set up my database, subtypes and domains.
Software: ArcMap 10.2.2, ArcGIS for Server 10.2.2, and full SQL Server.
Question: I currently have a point feature class with a number of fields but I'm primarily concerned about two. What I'd like is when the user goes to add a feature they fill out {field 1} from a drop down menu and based on what is selected in {field 1}, {field 2} produces the available options in a drop down menu. How would I go about setting this up?
Example: Say for instance {field 1} has domain values of Months and First Names and {field 2} has those values. If I choose Months from {field 1}, my available options in {field 2} are Jan, Feb, March, etc. If I choose Name from {field 1}, my available options in {field 2} are now Bob, John, and Mary.
Any help would be greatly appreciated, thanks in advance.
Hi Justin,
I don't think the idea is to store two types of different data in 1 field. I did some testing in ArcGIS Desktop and it seems to be possible. I am not so sure if this will be supported by AGOL.
What you will need to do is to create 4 domains:
When you create the subtypes you can define the default values AND assign a different domain to the field with the names and or months.
When editing, you can choose the datatype:
And depending on what you choose as data type (Month or Name) the list of values is changed according to the domain related to the default value for the field:
or
The result is:
... although I don't think you should do this...
Kind regards, Xander
Just to emphasize... it is technically possible, but from a database design point of few, you shouldn't use this.. unless the application you use it in (AGOL and its related products) requires such a strategy since you're trying to do something that is not supported by the product, but functional from a users perspective.