Jump to content

tagged text


Tas

Recommended Posts

Posted
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?
Posted

Is the field value being used in a rule which is returning tags? If

so, you'll need to use the NormalizeEntities function on the field

value.

For example:

return NormalizeEntities((Field(Var1)));

 

Don't forget to check the box for "Treat Return Strings As Tagged Text".

 

:)

Posted

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;

Posted

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!

Archived

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

×
×
  • Create New...