Post

1 follower Follow
0
Avatar

Need assistance with conditional text

I am trying to include text in a Word report, based on the value of a custom field.

I have created a custom field called "Phase" at the package level.  The use of the field is similar to "Release" for other CC elements.  It is also "optional", in that not every project includes phases.  What I would like to do in my requirements document is to include the following statement:

Phase: $Phase

but I would like to eliminate the entire entry if there is no value in the root package.

I have tried any number of different versions of $if, $exclude and $repeat statements, e.g.,

$if [Phase <> ''] Phase: $Phase $endIf

Nothing seems to work.

Is there something different about custom field values than other elements?

Anyone have any thoughts/suggestions?

Thanks!

Tom

Tom Tomasovic Answered

Please sign in to leave a comment.

2 comments

0
Avatar

Hi Tom,

You were soooo close. If you use all lowercase letters in your $endif, it should work.

Also, if you want to suppress the blank line if Phase doesn't have a value, just put the $endif on the next line and it will remove the carriage return. E.g.:

$if [Phase <> ''] Phase: $Phase

$endif

Hope this helps, let us know if you need more help.

Jeff

 

Jeff Marver 0 votes
Comment actions Permalink
0
Avatar

Jeff,

Looks like it's working the way I wanted.

Thanks!

Tom

Tom Tomasovic 0 votes
Comment actions Permalink