AnsweredAssumed Answered

python calculation error

Question asked by ursulafaus on Jun 18, 2018
Latest reply on Jun 19, 2018 by Dan_Patterson

trying to populate 1 Attribute with values from 1 of 3 Attributes dependent on a value in a 5th Attribute.  Formula is not working out.  Appreciate any help.

 

def !COUNT_FINA! ( !FLAG! ):
  if (!FLAG!== ''O'):
      return !LOC_F_OIL!
  elif (!FLAG!== 'G'):
      return !LOC_F_GAS!
  elif (!FLAG!=='B'):
      return !LOC_F_BOTH!

Outcomes