Author Topic: Make RTF template label text dependant on field  (Read 3743 times)

Screwtape

  • EA User
  • **
  • Posts: 93
  • Karma: +4/-0
    • View Profile
Make RTF template label text dependant on field
« 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?
Screwtape

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Make RTF template label text dependant on fiel
« Reply #1 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.

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Make RTF template label text dependant on fiel
« Reply #2 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:

  • The bookmarks Element.Keywords.Begin and Element.Keywords.End enclose the Keywords {Element.Keywords} report field, but if an element has no keywords, the Keywords label in the generated report is hidden and the space closed up.
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:

  • The bookmarks Pkg_Element_Meth_MethParameter_LIST_Begin and Pkg_Element_Meth_MethParameter_LIST_End in the parameter section set a comma that, in the report, is inserted between the multiple parameter name/type pairs in the section.
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:

  • The bookmarks Pkg_Element_Meth_FeatTagVal_TITLE_Begin and Pkg_Element_Meth_FeatTagVal_TITLE_End in the tagged value section insert a line space and the heading Properties underneath which is printed, in the report, the names and values of the parameter Tagged Values.
-----------------------------------------------------------------

HTH
Best Regards, Roy