1

Im trying to calculate a field called "bark t/ha" using the following expression:

if ($feature.Barkfuelhaz =="Low"){
  return"0"}
else if($feature.Barkfuelhaz =="Moderate"){
  return"1"}
else if($feature.Barkfuelhaz == "High"){
  return"2"}
else if($feature.Barkfuelhaz == "Very High"){
  return"5"}
else if($feature.Barkfuelhaz == "Extreme"){
  return"7"}

the expression validates however when I run it, all values in the Bark/ta field change to "0"

I've even tried running a simpler one "if ($feature.Barkfuelhaz == "Moderate"){ Return "2"}" but all values still stay as 0

  • 1
    What is the data type of the field you are calculating? Maybe return "0" should be return 0? – BERA Aug 23 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.