How do you display Choice List values with spaces in ArcMap?

2461
17
09-28-2016 03:55 PM
DougBrowning
MVP Esteemed Contributor

So on a Choice list you can not have spaces (which is a bummer really).  Spaces go in the label.  But I thought the label did get saved into coded values so that you could use the spaces version later on.  I swear I had this working before but I can not get the formatted with spaces version to show in ArcMap at all.  I want it to show on a layout page.

How can I do this?  

Thanks

0 Kudos
17 Replies
JamesTedrick
Esri Esteemed Contributor

If we're talking about a choice_list for a select_one, they are stored as domains on the service so the label should still show.  This won't work on select-multiple, and we're working on a number/text conversion issue if your values are numbers.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Ok I thought it did work but does not seem to now.  

In ArcMap I checked this box

But I still get this in the attribute table

Here is my Survey Excel sheet

Do you know what I need to check in ArcMap?  I am using the HFS directly.

Also i just noticed that it DOES pick up the domains and translate to spaces when I use the Data tab in AGO.  So maybe just a ArcMap to HFS bug?  I tried 10.2.2. and 10.4.1.

In the text box for the attribute in layout view it also says domainlookup = true but it is not working.

<dyn type="page" property="attribute" field="DutyStatus" domainlookup="true"/>

thanks

0 Kudos
JamesTedrick
Esri Esteemed Contributor

It does look like an issue of ArcMap not picking up the descriptions of the domain and displaying them.  Would you be willing a case with Tech Support on this?

0 Kudos
DougBrowning
MVP Esteemed Contributor

I guess I will try to carve out some time.  But even if they decide to fix it that will take several months.  Anyone have any ideas in the meantime?  I still swear this was not an issue before but maybe it was not with a HFS.

thanks

0 Kudos
JamesTedrick
Esri Esteemed Contributor

The main workarounds would be to download a local copy in a format that recognizes domains:

1) The Data tab of the website has file Geodatabase as an option for download as a point-in-time copy

2) I've developed a script & tool to support long-term syncing of surveys offline (i.e., initial download on first run, later runs only copy over incremental additions) GitHub - tedrick/SyncSurvey: Synchronize a Hosted Featuer Service to an Enterprise Geodatabase  .  We're planning a blog post on it shortly.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Number 1 is not an option.  I have a mxd with the HFS connected to Data Driven pages.  A downloaded copy would require adding the download copy to the map then relinking DDP.  All of this would throw scripting out the window.

Number 2 maybe.  Will have to see how DDP reacts to that and what changes i need to my script.  I will test and report back.  We were kinda waiting on Portal replication for this option.  I know syncing to a HFS is big on a lot of peoples list.

I just downloaded your script and the toolbox is empty... mistake?

Thanks

0 Kudos
DougBrowning
MVP Esteemed Contributor

Got the official back from support.  It is a bug.  Bummer.

Thank you for the table and the time to preform testing and research. I have a conclusion for you. both behaviors are related to defects. here is the breakdown.

1) HFS in attribute table displaying domains, 
-Logged Defect - BUG-000092872 - Domain descriptions are replaced with coded values when opening a feature service in ArcGIS for Desktop.
-Status - This was addressed and Implemented in 10.5 (next release)
-Workaround in 10.4 - Create local copy for editing > Enable coded descriptions > Refresh the attribute table.

2) HFS in Data driven pages insert attribute in the layout view.
-Logged Defect - NIM097640 - In the layout view, the dynamic text shows only the code instead of the code description when the data source is a feature service on ArcGIS online.
-Status - New
-Workaround: none

DougBrowning
MVP Esteemed Contributor

Just tested 10.5 Prerelease. Looks like they did fix the attribute table domain flip for single values but not for when it has a multivalue or multivalue option.  Is that a Survey123 issue though??

Also it looks like when using Data Driven pages no fields values will show up at all. It just always says empty.

Seems simple but does not work.  Sigh.

thanks

0 Kudos
JamesTedrick
Esri Esteemed Contributor

We don't create a domain for select_multiple questions - those are stored as a comma separated list, which means the domain would need to have many more entries to properly hold the combinations (i.e., values a, b, c and d lead to):

  • a
  • b
  • c
  • d
  • a,b
  • a,c
  • a,d
  • b,c
  • b,d
  • c,d
  • a,b,c
  • a,c,d
  • b,c,d
  • a,b,c,d
0 Kudos