Hi Team,
I was trying to use Document Composer Template Reference and wanted to know to Iterate a String[] in DCTL.
Eg.
We have Operation and under it we have ‘precondition’
To use in the template I have used following code
TableCell
Property property=“postconditions”
TableCell
Which gives me
{Postcondition 1, Postcondition 2}
So basically there are 2 Post conditions, and I wanted to:
a. remove curly braces ‘{’
b. Loop through each post condition and show it line by line
Please let me know how to do it.
Thanks
Nikhil
Sorry for late reply,
and I am sorry, for-each String[] property is not supported in DCTL now.
I think we will support it in the future. I will post here if have any news.
Loop througheach post-condition (and any String property) is supported in 16.0.
and you can <ForEach property="...">
+ name property to generate the String values one by one.
Sample:
<?xml version="1.0" encoding="UTF-8"?>
<ElementBaseInitiationBlock>
<Inline template="General/Element Basic"/>
<IterationBlock modelType="Operation">
<Sortings noSort="true"/>
<Inline template="Basic"/>
<HasValueChecker property="preconditions">
<Text style="@heading+">Pre-Conditions</Text>
<ParagraphBreak/>
<ForEach property="preconditions">
<Property property="name"/>
<ParagraphBreak/>
</ForEach>
</HasValueChecker>
</IterationBlock>
</ElementBaseInitiationBlock>
Please update the software to latest hotfix build (20190861 or later, version 16.0) to get the enhancement.
Details about update to latest hotfix build can be found at