We are in the process of migrating from ESRI JS 3.28 to 4.12, and I am trying to determine how one can dynamically set the ClassBreaksRenderer field attribute?
For instance, given the field attribute docs as an example (see below), assume that in the absence of the “totalAcres” property’s having a value, how can I fallback to another attribute on the feature, say, “totalAcres2”?
Is there a simple way to accomplish this? The field attribute is of type string and so I can’t seem to find an alternative. I’ve explored using Arcade expressions but feel there must be an easier way to specify which field to use at runtime.
Any help would be greatly appreciated.
You could try using `DefaultValue`, which is a logical expression in Arcade.
Replaces an empty value with a provided default value.
|value||*||The input value to compare against |
Using DefaultValue in a 4x sample for labeling