Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Screwtape on June 21, 2014, 12:54:25 am

Title: Make RTF template label text dependant on field
Post by: Screwtape on June 21, 2014, 12:54:25 am
I note in most of the templates and fragments, there are fields which have labels, where the label is only displayed if the field has data in it.

I've tried every context menu I can find to see how this is done, but to no avail. I also can't find anything in the documentation or help for this.

Can someone let me in on the secret?
Title: Re: Make RTF template label text dependant on fiel
Post by: Eve on June 23, 2014, 10:11:54 am
It's done by inserting bookmarks around the conditional text.

I'm not sure where in the help it is, but look for bookmarks with the same name as the field to see how it's done.
Title: Re: Make RTF template label text dependant on fiel
Post by: RoyC on June 23, 2014, 11:27:45 am
This information is in the integrated Help for build 1107 , released on June 5th.

I can't locate it in the Help for Release 11 on the website, so try this:

------------------------------------------------------------------------
Bookmarks provide additional facilities:

All .Begin and .End bookmarks that enclose a labeled field will hide the label in the report if the field has no content; for example:

All .Begin and .End bookmarks containing the string _LIST_ will add a comma to the enclosed section, so that all values extracted from the model for that section will be presented in a comma-separated list; for example:

All .Begin and .End bookmarks containing the string _TITLE_ will add a line break and a value title to the field, and present the values extracted from the model as a vertical list underneath the title; for example:

-----------------------------------------------------------------

HTH