Code does not move to next record after reaching count
Your code for repeating a merge record n times based on a database field value was just what I was looking for...
The only issues I'm having with the actual running of the code are;
1. it does not move to the next record after the required count is reached. In fact the record jut repeats over and over until the label page is full.
2. the second issue is formatting. I need to insert line feeds or carriage returns between the mergefields.
Here is the code I am using;
{IF{MERGEREC}= 1 {SET Idx 0}}{IF{Idx}<> {MERGEREC} "{SET Data "{MERGEFIELD LABEL_NAME} {MERGEFIELD SKU}"}{SET QTY {MERGEFIELD Quantity}}{SET Idx {MERGEREC}}"}{SET QTY {=QTY-1}}{REF DATA}{NEXTIF {QTY}= 0}
I have a subset of data in a spreadsheet with only two records each having a quantity value of three (3).
When I copy the code into 4 rows of 4 columns on label merge (using MS365 Word), only one record is repeated in all 16 labels.
Can you help me?
|