We have one more scenario, would like to skip the lines if isExclude =“true” or closedshort = “true” or both are true. So kindly let us know how to handled at word template level?
@alexey.noskov
Thanks for reply.
We have one more scenario, would like to skip the lines if isExclude ="true" or closedshort = "true" or both are true. So kindly let us know how to handled at word template level?
```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<PrintForm>
<SOACK_Total>224.000000</SOACK_Total>
<Order_Number>102235</Order_Number>
<SOAckDetails>
<isExclude>true</isExclude>
<closedshort>false</closedshort>
<Line>1</Line>
<Product>Force1</Product>
<Product_Description>HP</Product_Description>
<Product_Unit_Price>5.000000</Product_Unit_Price>
<Firmed>1.000000</Firmed>
</SOAckDetails>
<SOAckDetails>
<isExclude>false</isExclude>
<closedshort>false</closedshort>
<Line>2</Line>
<Product>Force2</Product>
<Product_Description>DELL</Product_Description>
<Product_Unit_Price>6.000000</Product_Unit_Price>
<Firmed>1.000000</Firmed>
</SOAckDetails>
<SOAckDetails>
<isExclude>false</isExclude>
<closedshort>true</closedshort>
<Line>3</Line>
<Product>Force3</Product>
<Product_Description>Apple</Product_Description>
<Product_Unit_Price>7.000000</Product_Unit_Price>
<Firmed>1.000000</Firmed>
</SOAckDetails>
<SOAckDetails>
<isExclude>false</isExclude>
<closedshort>false</closedshort>
<Line>4</Line>
<Product>Force4</Product>
<Product_Description>Accer</Product_Description>
<Product_Unit_Price>8.000000</Product_Unit_Price>
<Firmed>1.000000</Firmed>
</SOAckDetails>
<SOAckDetails>
<isExclude>false</isExclude>
<closedshort>true</closedshort>
<Line>5</Line>
<Product>Force5</Product>
<Product_Description>Thinkpad</Product_Description>
<Product_Unit_Price>198.000000</Product_Unit_Price>
<Firmed>1.000000</Firmed>
</SOAckDetails>
</PrintForm>
@alexey.noskov
Thanks for reply, your code is working fine. is it dose not working using our code.
Our sample code have attached. WorkOrder127.pdf (50.3 KB)
@akondewar It looks like the problem occurs when de-AT culture is set.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WORDSNET-26584
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@akondewar We have completed analyzing the issue and concluded to close it as not a bug. The nested formula field expression has an OR function with arguments separated by comma (,). However, the de-AT culture defines semicolon (;) as a list separator, which is used by MS Word and Aspose.Words to parse function arguments.
You should modify template document (replace , with ;) to get the expected result with de-AT culture.
@akondewarSKIPIF field is intended to skip the record in the data source upon executing mail merge. In your case however, you fill SKIPIF field after filling the document with data, so there is nothing to skip at this stage. If it is required to hide a whole table, you should wrap it into the IF field.
@akondewar Could you please provide a simple template and data you use to fill it with data along with your code that will allow to reproduce the problem? We will check the issue and provide you more information.
On your side you can debug your condition by putting { MERGEFIELD isExclude } = "8-All Line Items Received" } field outside the SKIPIF field and check what value it returns. This will allow you to understand what is wrong with your condition.
@akondewar Sure, you can use as many condition as it is required for your scenario. But OR accepts only 2 parameters and returns the value 1 (true) if either or both logical expressions x and y are true, or the value 0 (zero) (false) if both expressions are false. See FORMULA field for more information.
So to have three condition you should either use nested OR, something like this { = OR(x, OR(y,z))} or check sum of all conditions. For example: { SKIPIF { = { COMPARE { MERGEFIELD test1 } = true } + { COMPARE { MERGEFIELD test2 } = true } + { COMPARE { MERGEFIELD test2 } = true } } > 0 }
@akondewar Syntax is not quite right in the provided field code. Syntax of OR should OR(x,y) and syntax of AND is similar, i.e. AND(x,y). There is no need of = signe at the beginning of COMPARE field. So your condition should look like this: