AnsweredAssumed Answered

Label expression concatenate and round

Question asked by simsmap on Nov 25, 2012
Latest reply on Nov 26, 2012 by curtvprice
Hello,

I am trying to format half of my label red where it exceeds a set limit.

However, when I try and round the Field2 (which is numeric with many decimals) the python code does not allow me to concatenate.

any suggestions?

def FindLabel ( [Field1], [Field2] ):
  if [Field2] >= 1:
     return "# " + [Field1] + "<CLR red='255'><FNT size = '16'>" + ", Field 2 " + round(float([Field2], 2) + "</FNT></CLR>"
    else:
  return "# " + [Field1] + ", Field 2 " + round([Field2],2)

Would very much appreciate any help with this simple task.

Outcomes