Select to view content in your preferred language

Domains and Subtypes in AGOL

4222
2
11-26-2014 09:13 AM
JustinFuto2
New Contributor

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.

0 Kudos
2 Replies
XanderBakker
Esri Esteemed Contributor

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:

  • A coded value domain that holds two values (Month and Name)
  • A coded value domain that holds the months (with values 1 to 12)
  • A coded value domain that holds the names (values should not be in the range of 1 to 12)
  • A coded value domain that holds the months and the names (values and descriptions should correspond to the previous domains!)

4Domains.png

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.

2Subtypes.png

When editing, you can choose the datatype:

ChooseDataType.png

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:

ChooseMonth.png

or

ChooseName.png

The result is:

ResultingAtts.png

... although I don't think you should do this...

Kind regards, Xander

XanderBakker
Esri Esteemed Contributor

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.

0 Kudos