Quote:
Originally Posted by Echevca
I have clients with different set of products. For simplicity purposes lets pretend the products are called A, B, C, D. Not all clients have all four products. Client #1, for example only has products A and B; Client#2 only has product B and Client #3 only has products C and D.
My Excel file will look like this:
Client Product A Product B Product C Product D
Client 1 1% 2%
Client 2 2%
Client 3 3% 4%
I want to put a letter together that reference the % increase each product will incur without having to list all four products as a template and avoid spaces between the lines when there is no product. For example. the letter for carriers #1 will say that they are getting an increase for products A and B while the letter for Carrier #2 will say they are getting an increase for product. B....they will not see the other products listed since they don't have a % marked in the Excel file.
|
Assuming you want lists like:
Client 1
Product A : %
Product C : %
Product D : %
Client 2
Product B : %
Product D : %
Client 3
Product A : %
Product B : %
Product C : %
Product D : %
you don't need IF tests! Try:
{MERGEFIELD Product_A \b "Product A : "}{MERGEFIELD Product_B \b "¶
Product B : "}{MERGEFIELD Product_C \b "¶
Product C : "}{MERGEFIELD Product_D \b "¶
Product D : "}¶
where ¶ is an actual paragraph break or line break.
To conditionally output a whole table row, though, you would need IF tests but, unless you want to make things very complicated (so as to account for every possible combination), your output will generate a series of one-row tables. The one-row table approach uses fields like:
|Product|Current Price|New Price|
{IF{MERGEFIELD Product_A}<> "|{MERGEFIELD Product_A}|{MERGEFIELD Current_Price_A}|{MERGEFIELD New_Price_A}|¶
"}{IF{MERGEFIELD Product_B}<> "|{MERGEFIELD Product_B}|{MERGEFIELD Current_Price_B}|{MERGEFIELD New_Price_B}|¶
"}
etc., where the | characters represent table cell borders.