Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: lynch80516 on March 02, 2020, 03:49:39 am
-
I have element names and notes that contain & in the description link in a Acronym like TT&C, R&D, etc. However, when crating a document through a template it comes out as TT&C, R & D, etc. Is there a way to "escape" the & so it comes out correctly?
Thanks,
John
-
What kind of template did you use?
The regular template should translate these xml escaped characters. (in v15 or higher I think)
If you are using an SQL or script fragment you should indicate that it is a formatted field.
Geert
-
It is using a sql query via a fragment. I’m not familiar with a formatted field
John
-
See the help here:
https://www.sparxsystems.com/enterprise_architect_user_guide/15.1/model_publishing/custom_sql_fragments.html (https://www.sparxsystems.com/enterprise_architect_user_guide/15.1/model_publishing/custom_sql_fragments.html)
It is possible to force a field to be processed as a hyperlink or as formatted notes, by providing a column in this format:
custom >
{Name}
<fieldname>.Formatted (or <fieldname>.Hyperlink) (for all repositories, excluding .eap)
< custom
In your custom SQL Query statement, you must use an alias matching the template field name; for example (in MySQL):
SELECT ea_guid AS CLASSGUID, Object_Type AS CLASSTYPE, Name, Note as "Note.Formatted" FROM t_object
Where Object_ID=#OBJECTID#
For SQL Server I use
Note as [Note-Formatted]
In my queries.
Geert