Hello everyone,
I have created a new field called 'Settlement_class'. I want it to have two options (Settlement/Non settlement) based on the data in the Band field beside.
Bands B G H are settlements and the rest are non settlements. Is Arcade the best way to go about this?
Any help would be very much appreciated
thanks
Solved! Go to Solution.
A simple python expression would be easy as well?
try replacing fld with your fieldname in ! marks below ( !FieldNameHere! )
fld = 'B'
['Non-Settlement', 'Settlement'][fld in ['B', 'G', 'H']]
'Settlement'
fld = 'C'
['Non-Settlement', 'Settlement'][fld in ['B', 'G', 'H']]
'Non-Settlement'
var settlement_bands = ["B", "G", "H"]
if(Includes(settlement_bands, $feature.Band)) {
return "Settlement"
}
return "Non settlement"
You can use that expression
A simple python expression would be easy as well?
try replacing fld with your fieldname in ! marks below ( !FieldNameHere! )
fld = 'B'
['Non-Settlement', 'Settlement'][fld in ['B', 'G', 'H']]
'Settlement'
fld = 'C'
['Non-Settlement', 'Settlement'][fld in ['B', 'G', 'H']]
'Non-Settlement'
var settlement_bands = ["B", "G", "H"]
if(Includes(settlement_bands, $feature.Band)) {
return "Settlement"
}
return "Non settlement"
You can use that expression
Thank you Johannes