jaxNZ
Member
Hi There,
I've got multiple copies of a SO Invoice thanks to eewon(Dave) and watermark thans to Tim Dexters nice little solution.
But I cant get the watermark value to change for each copy.
I need 3 copies of an invoice each with its own watermark.
In the Word Header I have the following:
<?variable:x;3?>
<?for-each@section:On_Payment_Terms_S3?>
<?variable@incontext:currentorder;.?>
<?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,$x,1)?>
This does the looping.
I've added a word watermark; in the text I put <?$wMark?>.
In the body I adde a field and then added the following to this field.
<xsl:variable name="wMark" select="xdoxslt:ifelse(position()='1’,'Canceled','Approved')"/>
position() gives me the counter of the loop. Displaying this I can see it goes 1,2,3,1,2,3,1,2,3.
But the watermark is Canceled on all pages. I should seeCancelled,Approved,Approved, Cancelled,Approved,Approved etc.
When I change the value from 1 to 2, I get Approved on all pages.
Can anybody help? I think I need to make the wMark variable local to eacy copy interation. But not sure and not sure how to do it either.
Any ideas Welcome!
thanks
Jackie
I've got multiple copies of a SO Invoice thanks to eewon(Dave) and watermark thans to Tim Dexters nice little solution.
But I cant get the watermark value to change for each copy.
I need 3 copies of an invoice each with its own watermark.
In the Word Header I have the following:
<?variable:x;3?>
<?for-each@section:On_Payment_Terms_S3?>
<?variable@incontext:currentorder;.?>
<?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,$x,1)?>
This does the looping.
I've added a word watermark; in the text I put <?$wMark?>.
In the body I adde a field and then added the following to this field.
<xsl:variable name="wMark" select="xdoxslt:ifelse(position()='1’,'Canceled','Approved')"/>
position() gives me the counter of the loop. Displaying this I can see it goes 1,2,3,1,2,3,1,2,3.
But the watermark is Canceled on all pages. I should seeCancelled,Approved,Approved, Cancelled,Approved,Approved etc.
When I change the value from 1 to 2, I get Approved on all pages.
Can anybody help? I think I need to make the wMark variable local to eacy copy interation. But not sure and not sure how to do it either.
Any ideas Welcome!
thanks
Jackie