Select to view content in your preferred language

Attribute Values Change When Using Perform Analysis in Map Viewer Classic

381
2
04-14-2022 09:06 PM
GarrettRSmith
Frequent Contributor

Hello

I am having a problem when I am using the Perform Analysis tools in Map Viewer Classic.

If, for instance, I use the "Derive New Locations" tool to create a new hosted feature layer the new hosted feature layer attribute values are numeric (0-3) instead of the text (None - More than 5 present). I am trying to use the new feature layers in a web app where users will filter based on the the text values and not the numeric values that do not mean anything to the public users of the web app.

The original hosted feature layer comes from Survey123 and the numeric values are not what the users see. I cannot find anything that allows me to keep the text values and not the numeric values. The same thing happens if I download the shapefile, the attribute table of the downloaded shapefile contains numbers in the columns and not text.

Thanks for any suggestions. 

0 Kudos
2 Replies
ABishop
MVP Regular Contributor

Hello Garrett,

Sounds like you are dealing with a coded domain?  Is there a way you can peek at the database where the hosted data is derived?  If so, I would check the data for a domain with coded values.  The coded values would need to both be text in order to display it on the end user side.  Hope this makes sense.

Amanda Bishop, GISP
0 Kudos
AmandaRing
Esri Contributor

Hi @GarrettRSmith,
I agree with @ABishop that it sounds like you are using data that has coded domains. Unfortunately, it is a known limitation of the analysis tools that they aren't able to support maintaining the coded domains for your values.
Either before or after you run Derive New Locations, you can add those values as an extra field in your layer. 

Two possible ways to do that:
1. If you have the numeric values and their associated text values stored in a table, you could use Join Features to join that domain table to the feature layer, with the numeric field as the "field to match" in both the join and target layer.

2. You could add just add a new field to the feature layer, and then use Calculate to populate that new text field. For example, you could use Arcade, and then use an expression like the following to set the text values according to the numeric values in the field HowMany:

When(
  $feature.HowMany == 0, "None",
  $feature.HowMany == 1, "Barely there",
  $feature.HowMany == 2,  "A few",
  $feature.HowMany == 3,  "More than 5 present",
"Other")


Once you've added the new field, you can use that field as the field to filter on.

Amanda
Product Engineer - Web Analysis
0 Kudos