Jump to content

tagged text


Tas

Recommended Posts

I have a rule that includes a tag for line breaks. Some of the data that is being returned contain &'s. The & is being omitted from the output. I've checked the composition log and I am getting an "Unknown Entity" error. Any suggestions?
Link to comment
Share on other sites

Yes, the rule is returning tags and I have checked the "Treat Return Strings As Tagged Text" box. I've added the Normalize Entities function and am getting the same result. Do I have it in the incorrect location or am I using the wrong syntax? I don't want to uppercase this text, is that an issue?

 

Here is the rule:

 

if (Field("DISTRIBUTION_INSTRUCTIONS") == "home address")

{

var window = Field("FIRST_NAME") + " " + Field("LAST_NAME");

if (Field("ADDRESS2") != "") {var window = window + "<br>" + Field("ADDRESS2");}

if (Field("ADDRESS3") != "") {var window = window + "<br>" + Field("ADDRESS3");}

if (Field("ADDRESS4") != "") {var window = window + "<br>" + Field("ADDRESS4");}

if (Field("COUNTY") != "") {var window = window + "<br>" + Field("COUNTY");}

if (Field("POSTAL_CODE") != "") {var window = window + "<br>" + Field("POSTAL_CODE");}

}

else

{

var window = Field("FIRST_NAME") + " " + Field("LAST_NAME");

if (Field("PROJ_LOCN") != "") {var window = window + "<br>" + Field("PROJ_LOCN");}

if (Field("OPER_UNIT") != "") {var window = window + "<br>" + NormalizeEntities(Field("OPER_UNIT"));}

if (Field("OPER_UNIT_2") != "") {var window = window + "<br>" + Field("OPER_UNIT_2");}

}

return window;

Link to comment
Share on other sites

Alex, thank you for your help with the NormalizeEntities function. It works great! I mentioned in my previous note that it didn't seem to be working, as I was getting the same result. I have since realized that I was applying the function to the wrong field... :rolleyes: It's one of those days.

 

Anyway, thanks for your help!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...