Nested numberFormat

I’m trying to format a number for a mouseover event. If I use numberFormat(22.3456,“0.0”) everything works fine. What I need to do is nest a tag value in the number argument. It would look soemthing like this:
numberFormat(tag("{FANCOILS/"+{Root Container.contFC_7_1.EquipID}+"/Temp}"),“0.0”)

The tag function works fine on its own but returns an unformatted number. Is there a problem with my syntax or is nesting not allowed here?

Try something like this:

numberFormat(tag("FANCOILS/"+{Root Container.contFC_7_1.EquipID}+"/Temp"),"0.0")

You just had too many squiggly braces - you don’t need them for the string passed into the tag() function.

Here is what I have. I’m not sure where I got the text I sent in the first time.

[code]switch(tag(“FANCOILS/”+{Root Container.contFC_7_1.EquipID}+"/STATUS")
,1,2,3,4,"COOLING ","SATISFIED ","OFFLINE ",“DEFROSTING “,””)

  • numberFormat(tag(“FANCOILS/”+{Root Container.contFC_7_1.EquipID}+"/Temp"),“0.0”) + " °F"[/code]

This includes the entire expression.

I get a Type mismatch: Argument 0 for the function numberFormat(number,pattern) is an invalid type.

What is the type of that tag? You can try casting it to a double like this:

switch( tag("FANCOILS/"+{Root Container.contFC_7_1.EquipID}+"/STATUS"), 1,2,3,4, "COOLING ","SATISFIED ","OFFLINE ","DEFROSTING ","" ) + numberFormat( toDouble(tag("FANCOILS/"+{Root Container.contFC_7_1.EquipID}+"/Temp")), "0.0" ) + " °F"

That’s the ticket :smiley:

Thanks for the bailout.