Hi,
I have an arcade expression which populates a field base on all the variables of 3 other fields, I have written this in a very long winded way but it works.
Currently the example is like this.
if($feature.Feat_1 == 'A' && $feature.Feat_2 == 'A' && $feature.3 == 'A')
{return 'Y'}
if($feature.Feat_1 == 'A' && $feature.Feat_2 == 'A' && $feature.3 == 'B')
{return 'Y'}
This repeats with every single possible variation . . . . .
else {return 'Unknown'}
I was thinking that creating a variable for each of the fields would work but I'm not getting anywhere with my limited knowledge of arcade and after some further reading over similar needs on the forum I'm unsure of if I should be using a When or Expects function??
Any help would be greatly appreciated.
Solved! Go to Solution.
You could also consolidate your arrays with something like this, but you might prefer the more verbose method, which is easier to understand.
var width1 = ["3m4m","4m"];
var width2 = ["1m","1m2m", "2m3m"];
var width3 = ["2m3m"];
var depth1 = ["1m","1m2m", "2m3m","3m4m","4m"];
var depth2 = ["2m3m", "3m4m","4m"];
var basesub1 = ["BDP","VDP"];
var basesub2 = ["BM","VM","VSP","VSM","VSP"];
var basesub3 = ["VSM","VM","BM"];
var basesub4 = ["VSP","PSS","PSD"];