Iterating on 'Quantity' and appending an incrementing value

I have a workflow to print out barcode labels automatically when we sell certain items. The barcodes have a lookup code so we can track the item back to a particular invoice. Everything is working great, except we can't track multiple identical items on one order properly.

Our business is making custom beer/wine/cider for individual people. Every batch has to be trackable back to an invoice throughout its production. What we are doing currently is printing a tag with <invoice number><sku> as the barcode - this works great most of the time, but sometimes customers will order multiple of the same item. When Pabbly receives the transaction, it'll have a structure like:
{
"sale": {
"invoice": "12345",
"items": [
{
"Item": "Pilsner",
"SKU": "9876",
"Quantity": "2"
}
]
}
}
What I'm doing right now is creating a tag with "12345-9876" and then executing the print action with "quantity" as the number of labels to print. This gives me the right number of labels, but it creates multiple labels with the same code.

What I want to do is append a sequence number to the end of the code and repeat the print action "Quantity" number of times, incrementing the sequence each time. So in this case I want to end up with two labels:

"12345-9876-1"
"12345-9876-2"

I see that there's a math operation action which can increment a counter, but I'm not clear how to keep repeating an action until the counter = Quantity.
 

Kunal Valuskar

Member
Staff member
Hey @TerminalCity

We checked the scenario with the technical team and got to know that the scenario that you are looking for is currently not possible in the system.
We will let you know if we think of any other solution for this issue. We will keep you updated on the status of this conversation.
 
Top