Author Topic: RTF Generation: display tagged values only is populated  (Read 232 times)

Guillaume

  • EA User
  • **
  • Posts: 816
  • Karma: +22/-0
    • View Profile
    • www.umlchannel.com
RTF Generation: display tagged values only is populated
« on: November 27, 2019, 12:38:10 am »
I'm working with an RTF template and need to achieve the following: for an element in my package, display the Name and 2 tagged values e.g.
{Element.Name}
Property A : {Element.valueOf(tag1)}
Property B : {Element.valueOf(tag2)}
-> I want to remove the "Property A : " label when tag1 value is empty. Is there an option or workaround (fragments?)  to achieve that? All the filters that I found apply to elements, connectors or diagram, not a tagged value of the generated element.

Note: tagged values can be rendered with specific fonts or within a table (so I don't want to generate the table when the tagged value is empty).

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9537
  • Karma: +274/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: RTF Generation: display tagged values only is populated
« Reply #1 on: November 27, 2019, 05:32:12 am »
Have you tried with the bookmarks?

Personally I would probably go for an SQL fragment as that is easier than the trial and error guessing game with the bookmarks.

Geert

Guillaume

  • EA User
  • **
  • Posts: 816
  • Karma: +22/-0
    • View Profile
    • www.umlchannel.com
Re: RTF Generation: display tagged values only is populated
« Reply #2 on: November 29, 2019, 02:05:56 am »
Hi Geert,

I managed to get it to work with a small SQL fragment. Down side is that I have as many SQL fragment as tagged values I need to generate but it does the job.

Cheers
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9537
  • Karma: +274/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: RTF Generation: display tagged values only is populated
« Reply #3 on: November 29, 2019, 03:34:49 pm »
Hi Geert,

I managed to get it to work with a small SQL fragment. Down side is that I have as many SQL fragment as tagged values I need to generate but it does the job.

Cheers
Hmm, I think with a clever use of CASE WHEN... you can probably combine all of the tagged values into one fragment. I did that in a number of templates.

Geert

Guillaume

  • EA User
  • **
  • Posts: 816
  • Karma: +22/-0
    • View Profile
    • www.umlchannel.com
Re: RTF Generation: display tagged values only is populated
« Reply #4 on: November 29, 2019, 06:52:17 pm »
Thanks for the hint Geert. I'll give it a go.
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com