Reputation: 1260
I am actually using conga composer with word template to generate word doc fill with data from my database. There is a section where I have to display from a loop a single line that meet a requirement. This also works fine, but when looping, for each line that do not match the requirement words is leaving a blank line. I don't want blank lines to appear :
Here is my IF condition :
A : {{TableStart:TiersPrestataires}}
{ IF "<<variable>>" = "S1" "<<variable1>> <<variable2>>" ""}
{{TableEnd:TiersPrestataires}}
If in my TiersPrestataires variables I have 5 lines , with the 3rd line that respect the condition, this will print :
A :
<blank_line>
<blank_line>
some text represented by variable 1 some text represented by variable2
<blank_line>
<blank_line>
I want to print :
A:
some text represented by variable 1 some text represented by variable2
and that's all.How can I prevent word to replace the unmet condition with a blank line ? Is there something I can specify in my else condition?
Upvotes: 0
Views: 3055
Reputation: 21
It will be the way you position your brackets.
So I am assuming is another conditional, therefore you would do it like:
A:
{ IF (CONDITION 1) "true
"}{ IF (CONDITION 2) "true
"}{ IF "<<variable>>" = "S1" "<<variable1>> <<variable2>>
"}{ IF (CONDITION 4) "true
"}{ IF (CONDITION 5) "true
"}
If you only want to show content when condition is met then you only need to do one set of " " after the condition as false will be blank anyone.
Doing it this way ensures there are no blank lines left from the IF.
Hope this helps.
Upvotes: 1