Drop down menu for attributes when creating/editing points in ArcGIS Online?

4594
10
Jump to solution
09-06-2019 06:20 AM
TiffanyWu
New Contributor II

I have two hosted feature layers in AGOL that were both published from Pro to AGOL. Both are relatively similar in fields and attributes with some differences in # of rows. When trying to add a point in AGOL using the Edit tool, only one of them has drop-down menus for different attributes that help you populate the attribute by just clicking on the options, rather than having to type it. I'm trying to get the other feature layer to do the same when adding points, but I don't see an option to designate drop-down menus in the Edit tab. Any suggestions or help would be greatly appreciated! 

Photo attachment of the drop-down: 

0 Kudos
1 Solution

Accepted Solutions
ChelseaRozek
MVP Regular Contributor

Try this:

On your hosted feature layer's item details page, go to the Data tab>click the Fields button> click on the display name of the field of interest (blue hyperlink)>check out the List of Values (Domain) at the bottom of the screen. If there are choices in a drop down when editing, they should be displayed here.

You can click the Edit button to Add, Remove, or Reorder choices. If the field is text, I usually just make the Label and Code columns the same value. Otherwise, if the field is a integer, it could be something like label Yes, code 1 and label No, code 0.

View solution in original post

10 Replies
ChelseaRozek
MVP Regular Contributor

Try this:

On your hosted feature layer's item details page, go to the Data tab>click the Fields button> click on the display name of the field of interest (blue hyperlink)>check out the List of Values (Domain) at the bottom of the screen. If there are choices in a drop down when editing, they should be displayed here.

You can click the Edit button to Add, Remove, or Reorder choices. If the field is text, I usually just make the Label and Code columns the same value. Otherwise, if the field is a integer, it could be something like label Yes, code 1 and label No, code 0.

TiffanyWu
New Contributor II

Thank you so much!!! This definitely did the trick.

Another question I have regarding these feature layers that I'm not sure how to edit, is the fields of "CreationDate" and "EditDate". In the old feature layer, there's a dropdown menu for those and it works well so you can set when you created the point. In the "Data" tab, the Default Value is set to "None". In the new feature layer, the default value is shown as: Fri Dec 29 1899 19:00:00 GMT-0500 (Eastern Standard Time) and when adding a point, the dropdown menus for those is completely grayed out and you can't click it or change it. Is this strange?

0 Kudos
ChelseaRozek
MVP Regular Contributor

That does seem strange. You said these were originally published from Pro, so they were created in Pro from scratch? Where did they originally live, a file geodatabase? Normally those fields are autopopulated with the creation or editing datetime when making/editing features in ArcGIS Online. I have never seen dropdown menus for them before. Is it a calendar picker or a text based one (like your original screenshot)? I'm wondering if these were custom fields instead of the ones added by ArcGIS. What is the field value type for them?

0 Kudos
TiffanyWu
New Contributor II

Yup, I think both were published from Pro and both were originally a file geodatabase. The old layer's date fields dropdown menu is a calendar picker. I've provided a screenshot below of what it looks like.

I'm not sure what this means, since I'm working on the new one and didn't work on the old layer. Does it seem to be a custom thing?

Also, both field value types are not available (as shown in the "Data" tab).

0 Kudos
Katherine_Clark
MVP Regular Contributor

So, when you turn on editor tracking in a hosted feature layer, the CreationDate and EditDate fields are automatically added to the layer. These are populated automatically when a feature is created. 

It sounds like before, you had a field that was created with a "Date" data type, so that the user would manually pick a date when a feature was created. The editor tracking is nice because it automates that step and ensures data accuracy, but obviously would not help if a date had to be recorded that was not the current date and time. 

0 Kudos
ChelseaRozek
MVP Regular Contributor

Indeed, that's how I usually use it, the automatically added and automatically populated CreationDate and EditDate fields. I can't even make those fields editable (via Configure Attributes) in a layer I freshly made in ArcGIS Online because you shouldn't be able to since they will autoupdate each time you create/edit features. No manual editing needed.

Since you ARE able to edit these fields, I'm wondering if you have the automatically added CreationDate and EditDate fields from AGO in addition to these fields that you CAN edit that were probably made in the field geodatabase. 

Tiffany Wu Can you provide this screenshot of your fields? 

0 Kudos
TiffanyWu
New Contributor II

Thanks to both of you! Katherine Clark

I just thought it was weird that the default type for the new layer was some random date in 1899, but does that mean when the point is created those will just automatically update with no worries? That's probably better than having a calendar picker.

The data is pretty sensitive so I've blocked out some of them, but this is probably all that's necessary.

This is a screenshot of the new layers' fields, and the old one looks the same in terms of the CreationDate and EditDate fields.

0 Kudos
ChelseaRozek
MVP Regular Contributor

One more question, what's it look like on your hosted feature layer's settings page under Feature Layer (hosted)? Do you have any of the first 4 check boxed checked concerning editing?

I tried replicating your situation:

- I created a polygon feature class in a file geodatabase in Pro. Manually added a EditDate and CreationDate fields.

- Published to AGO. When I checked "Enable editing", no fields were added. When I checked "Keep track of created and updated features" and "Keep track of who created and last updated features", it finally added the "automatic" fields, seen in yellow. Since I already had fields named CreationDate and EditDate, it named the new fields "_1" at the end.

- When I edited in AGO, only the yellow fields automatically updated. This is because AGO knew these fields were to track created/edited features. The ones I manually made in Pro, it knew nothing about so it didn't autopopulate them. They just happened to be named "EditDate" and "CreationDate" but didn't have the intelligence behind them.

So if your fields aren't autopopulating, I'm thinking they were manually created fields in Pro that happened to be called the same things as ArcGIS looks for. Since you don't have duplicates of these so named fields, your "Keep track of created and updated features" and "Keep track of who created and last updated features" may not be checked on. Not sure if you did this since I'm not sure if they're autopopulating correctly or not, but best practice (for Pro) is to "Enable Editor Tracking" on a feature class like this (see below). Otherwise, like I just mentioned, it can be done in ArcGIS Online. This will add all the needed fields and ArcGIS will know those are the ones it should be populating with the automatic values.

Still not sure about the default value on the date field, I would try to change that to None if possible.

0 Kudos
DannyGonzales
New Contributor II

Is there a way to add in more options for the Drop-down after being put into AGOL?

0 Kudos