Can fields be conditionally included in template

357 views
Skip to first unread message

Johnson@localhost R. Johnson

unread,
Feb 10, 2014, 1:36:00 PM2/10/14
to sparx-enterprise-archite...@googlegroups.com
I am trying to conditionally include/exclude fields from my document templates. An example is for Attribute Defaults. If the Default is not blank, then I want to display [Def. : {Att.Default}], otherwise I want to exclude the entire string.

So the output would look like this:

With default: XXXXX [Def. (1)]
Without default : XXXXX

Another place I'd like to be able to do this is in my Element name sections. I have some packages that have line numbering enabled (Requirements, Use Cases, etc) I want to display the Number followed by the Name. But for packages where the line numbering is turned off, I end up having extra space before my names.

Is there any way to do conditional formatting field inclusion?

I'm currently using version 9.0.

[original message]

Ortmann@localhost Helmut Ortmann

unread,
Feb 10, 2014, 3:40:00 PM2/10/14
to sparx-enterprise-archite...@googlegroups.com
Hello,

as far as I know there is no solution for EA 9.

Consider using 10/11.

With fragment templates/fragment scripts in EA 10 you can manage conditional output.

Be aware:
There are some problems in EA 10 regarding stability. You ma give it a try. There are threads in this forum.

Regarding line numbering.
I don't know any solution. Maybe another person know something.

Helmut


[original message]

M@localhost Simon M

unread,
Feb 11, 2014, 4:48:00 PM2/11/14
to sparx-enterprise-archite...@googlegroups.com
EA 11 introduces functionality to do this, and uses it in the standard reports. Unfortunately we haven't put a GUI around the functionality yet.

It is done by adding a bookmark around the field that includes conditional text.

eg.
XXXXX{Att.Default.Start} [Def. ({Att.Default})]{Att.Default.End}

Note that the bookmarks are not visible in the editor. I have coloured, italicized and wrapped them in {} to try to express this.

[original message]

stevesavage

unread,
Jun 22, 2014, 4:36:43 PM6/22/14
to sparx-enterprise-archite...@googlegroups.com
Has the ability to work with conditional text (in the GUI) been added yet?
[original message]

stevesavage

unread,
Jul 6, 2014, 5:35:21 PM7/6/14
to sparx-enterprise-archite...@googlegroups.com
Can you use this within a "custom" tag?
e.g. I have a custom query result with the field TEST1

Custom.TEST1.Start
and
CustomSQL.TEST1.Start

neither worked.

[original message]
Reply all
Reply to author
Forward
0 new messages