I would like to see in my pop up e.g. "N/A" for all 0 values in a numeric field trying to do:
var salinity = $feature.d_sal_max;
IIF(salinity == 0,'N/A',salinity);
This leaves all 0 values empty (instead of showing "N/A") in the pop up and returns the actual value for all other values. Putting ' ' around the 0 doesn't make a difference.
The Expression:
var salinity = $feature.d_sal_max;
Replace(salinity, 0, 'N/A');
Replaces all 0 with "N/A", meaning "0.111" will appear as "N/A.111".
Any ideas?
Thanks,
Annina
Solved! Go to Solution.
Thanks Carmel and Dan for these immediate replies!
What I missed was to configure the expression as string (within the "Configure Attributes"-window). And as the values have too many decimals, I added a ROUND() to the variable.
Now it works like a charm.
Hi Annina,
How about:
IIf($feature.d_sal_max == 0, "N/A", $feature.d_sal_max)
More information here: What’s New in Arcade (June 2017) | ArcGIS Blog
Carmel
plus the functional reference is a useful link
Thanks Carmel and Dan for these immediate replies!
What I missed was to configure the expression as string (within the "Configure Attributes"-window). And as the values have too many decimals, I added a ROUND() to the variable.
Now it works like a charm.
Greetings community:
Have a similar case. Have an excel table with a colum with numeric codes and another colum with a description, for example:
34.................Blue car
35.................Green Carpet
36.................Brown vaccun
Is there a way i could use Model Builder to automatically substitute the numeric code with the descriptor once the excel table has been improted and appended to a layer's atribute table?
Thank you.