Skip to main content
formatting
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

Try this: def FindLabel ([cis12DCE],[cis12DCE_Ex]): if int([cis12DCE_Ex]) == 1: return ""+"cis-1,2-Dichloroethylene "+str([cis12DCE])+"" else:
return "cis-1,2-Dichloroethylene "+str([cis12DCE])

def FindLabel ([cis12DCE],[cis12DCE_Ex]):
  if int([cis12DCE_Ex]) == 1:
    return "<clr red = '255'>"+"cis-1,2-Dichloroethylene  "+str([cis12DCE])+"</clr>"
  else:   
    return "cis-1,2-Dichloroethylene  "+str([cis12DCE])

Try this: def FindLabel ([cis12DCE],[cis12DCE_Ex]): if int([cis12DCE_Ex]) == 1: return ""+"cis-1,2-Dichloroethylene "+str([cis12DCE])+"" else:
return "cis-1,2-Dichloroethylene "+str([cis12DCE])

Try this:

def FindLabel ([cis12DCE],[cis12DCE_Ex]):
  if int([cis12DCE_Ex]) == 1:
    return "<clr red = '255'>"+"cis-1,2-Dichloroethylene  "+str([cis12DCE])+"</clr>"
  else:   
    return "cis-1,2-Dichloroethylene  "+str([cis12DCE])
Source Link

Try this: def FindLabel ([cis12DCE],[cis12DCE_Ex]): if int([cis12DCE_Ex]) == 1: return ""+"cis-1,2-Dichloroethylene "+str([cis12DCE])+"" else:
return "cis-1,2-Dichloroethylene "+str([cis12DCE])