2D codes using logic for inserters

260 views
Skip to first unread message

Réal Cantin

unread,
Feb 22, 2022, 4:45:11 PM2/22/22
to XMPie Interest Group
Our inserters use 2D code (datamatrix) to insert differents number of sheet per recipients and add brochures placed in station selcted by logic. i.e.: english letters will have english brochures and french letters will have french brochures. 

Plus, our inserters need to see in the 2d codes :
field one: sequence number (six digits pad with zeros) 000001
field two: sheet number (three digits pad with zeros) 001
field three: number of sheets in the enveloppe) (three digits pad with zeros) 002
field 4, 5 and 6: reserved for calling the station
field seven: a counter, in loop from zero to 9 (the inserter will stop if the sequence is broken)
field eight: the last 12 caracters are static and its use to store information about the docket number and the customer. 

I was happy to discover the newly added 2d codes features but I cant figure out to make it happen since I can only put one state.adorValue in the javascript function.

Maybe somebody here can shed a light on this?

Thankyou

couch

unread,
Feb 22, 2022, 4:48:42 PM2/22/22
to XMPie Interest Group
So, if I understand your question, you're OK with creating the barcode, but want to use multiple ADORs and have only one state.adorValue to use in the new page numbering barcode panel?

The solution for this is to create a new Text ADOR that combines all the text and numbers that you want to put into the barcode, and then use this new ADOR as the state.adorValue.

Tyrone O'Brien

unread,
Feb 22, 2022, 4:59:16 PM2/22/22
to xmpie...@googlegroups.com

Here is an old example of how I created a similar 2D barcode, hopefully it points you in the right direction.

 

Regards

 

Tyrone O’Brien

E. tyr...@connect1to1.com.au

M. 0416 614 187

W. www.connect1to1.com.au

--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpie-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xmpie-users/521c0cfa-721f-49bf-bdb0-e13dc04a3a9en%40googlegroups.com.

 




Avast logo

This email has been checked for viruses by Avast antivirus software.
www.avast.com


barcodeset_test.csv
hopperselection_test.plan

Réal Cantin

unread,
Feb 23, 2022, 3:15:30 PM2/23/22
to XMPie Interest Group
Hi M. Couch.

Yes, I already test that way. But, in uPlan I cannot pass in the ador the state.indexValue nor the state.countValue. So my ador wont have the logic to support the infamous field 7 which count the number of sheet passing thru the inserter camera.
Before the new page numbering barcode panel I was able to create many barcodes and logic to make it happen. My expectation with the new feature is that I should be able to create only one barcode in the master page that can pass all the information I need from field one to eight.

Lets say record one will have two sheets in the envelope and record two will have three sheets in the envelope.
Each sheets will have a 2D code on the upper side which tell the inserters about the @(Field_7).
This field is a number starting from zero and increment of one at each and every sheet, regardless the number of record.

That means:
record one sheet one @(Field_7) = 0,
record one sheet two @(Field_7) = 1,
record two sheet one @(Field_7) = 2,
record two sheet two @(Field_7) = 3,
record two sheet three @(Field_7) = 4

and so on till @(Field_7) reset to zero. (@(Field_7) can only be a one digit number).

Let me know if my explanation makes things clearer. It seems I have some problems to understanding it myself!
Anyway, thanks for you help!

couch

unread,
Feb 23, 2022, 3:47:41 PM2/23/22
to XMPie Interest Group
What you want is not possible:
1) uPlan clears all state/variables/adors as it starts to process each record of the database. So there is no way for uPlan to pass a number from one database record/recipient to the next.
2) uPlan interprets the data and calculates variables and ADORs before the document composition occurs, so if the composition will generate a different number of pages for different records, then there is no way for the uPlan logic to know how many pages will be required for each record/recipient in the database.

What you are asking for is a feature request which you should log with XMPie Support, or you can find a feature request form in the XMPie Customer Info Portal.

Secondly, for future customers reading this who want to pass multiple values into the barcode, and have the indexValue or countValue inserted in between the database values: In this case you cannot do the logic in uPlan. You need to do the logic with JavaScript in the Page Number Barcode panel:
If you have multiple database values to put in the barcode, you need to add them into one ADOR object that you can pass into the JavaScript since you have only one state.adorValue variable.
To pass multiple values in the ADOR simply make the ADOR a comma or pipe separated list of values that you need from the database or plan.
Then in the JavaScript, use the split() function to separate the values and create the string for the barcode using the state.indexValue, state.countValue and any of the split values in any sequence needed in the barcode.

Réal Cantin

unread,
Feb 24, 2022, 8:22:50 AM2/24/22
to XMPie Interest Group
Hi M. Couch,

Yes, my investigation led me to the same conclusion, uPlan wont let me pass the count pages to the next record. So I have to use JavaScript in the page numbering barcode panel.
The second part of your explanation is certainly a way to investigate. I will test the split() function as soon as I can and give you an update.

Of course, as I'm not a expert in JavaScript, I will read some documentation before to be sure I understand the basic. At last, there is some hope.

Thanks for your help!

Réal Cantin

unread,
Feb 24, 2022, 3:07:26 PM2/24/22
to XMPie Interest Group
I tried the solution of M. Couch with no luck. I know I'm very closed to it but I cant write an Ador as a comma or pipe separated list of value without an error from uPlan.
However I am able to call the items in the list. This behavior is a complete mistery for me.

Anyone on this?

couch

unread,
Feb 24, 2022, 4:18:10 PM2/24/22
to XMPie Interest Group
QLingo expression to pass firstname and lastname as a comma separated list:
|->[firstname] & "," & |->[lastname]

Réal Cantin

unread,
Feb 25, 2022, 2:56:41 PM2/25/22
to XMPie Interest Group

M. Couch,
Thanks for the tip.
I was trying to concatenate the expression with the plus sign. Well, I told you I was a apprentice right?
I believe I can pass variables in the comma separated list text ador?  
Also, I would not push my luck to far but,is it possible to have some working example piece of code in javascript that I could edit to reach my needs?

I would certainly be greatly appreciated from a long time user of Xmpie.

Regards,

ROBERT HOPFNER

unread,
Feb 25, 2022, 11:59:09 PM2/25/22
to xmpie...@googlegroups.com, Réal Cantin
if I remember correctly, I would do my calculations, concatenations etc. in the variable and then set that variable inside the 2D barcode ADOR.

I am not sure if it necessary, just made the code cleaner to read.

thanks,
Bob
--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpie-users...@googlegroups.com.

Réal Cantin

unread,
Feb 28, 2022, 9:00:05 AM2/28/22
to XMPie Interest Group
Hi,

Thanks to everybody who tried to help me so far. Reading the comments makes me think that I wasn't very clear and I want to apologise for this. I'm not perfectly fluent in this language so I am the one to blame.

I will insist on the fact that I used 2D codes for our inserters for years but, I just cannot send productions in one go when some letters have not the same numbers of sheets. This issue leds me to split the data and send the letters in batch according to the amount of sheet. And, that is why I had great expectation with the new feature. Curiously, other department and teams in our company dont experiment this behavior using their composition software. We have many solution for composition and XMPie is the only software having this issue.

Here is the description of the elements inserters needs to see in the 2d codes.

field one: sequence number (six digits pad with zeros) "000001"  Generated with a variable « GetEnv("CurRecordNumber") » So this field can be pass with an ador with the state.adorValue

field two: sheet number (three digits pad with zeros) "001"    This field will use the state.pageIndex 

field three: number of sheets in the enveloppe) (three digits pad with zeros) "002"   This field will use the state.pageCount

field 4, 5 and 6: reserved for calling the station.   These three digits can easily be edited via uPlan.  So just forget them (for now)!

field seven: a counter, which loop from zero to 9 (the inserter will stop if the sequence is broken)   My main issue here. Just wondering if there is a way to extract 
the last digit of state.pageIndex. It should also add it (+) to the variable « GetEnv("CurRecordNumber") »

field eight: the last 12 caracters are static and its use to store information about the docket number and the customer. 


So the main issue is with no doubt the field 7
The Field 7 is a counter looping from 0 to 9, which stop the insert if the sequence is broken.
The way I was dealing with it so far was to extract the last digit of the actual sequence number, which is generated with a variable « GetEnv("CurRecordNumber") »
What I call the «Field 7» wont work with multiple range of sheet. That means the letter who have a different number of sheet, will not display the right number.

Finally, to Tyrone;

Great piece of work Tyrone, thankyou.
Looking at it I see that some value of the 2D Code are extract fro the data. Unfortunately our standard will prevent us to edit the data from tour customer.
Thanks anyway. I appreciate.

to Bob,

Any input are valuable and appreciated so thank you for that.

To M. Couch,

I will see if the feature request form in the XMPie Customer Info Portal will work for me. Thank you.

couch

unread,
Feb 28, 2022, 5:54:19 PM2/28/22
to XMPie Interest Group
You should be able to use the modulo function to easily get a repeating 0-9 sequence. This is possible in either JavaScript or in QLingo.
Your problem still remains: If you want the 0-9 sequence to continue across all recipients (I mean not to reset back to 0 for the first page of each recipient) it is only possible if each recipient has the same number of pages.
If you have a variable number of pages per recipient, then today, there is no way to carry over data from one recipient to the next.

couch

unread,
Feb 28, 2022, 6:45:01 PM2/28/22
to XMPie Interest Group
If it helps any, attached is a sample showing how to achieve something similar to what you want - but has only 2 pages per recipient. 
As discussed already, today it is not possible for a document with variable # of pages per recipient.

barcode.zip

Réal Cantin

unread,
Feb 28, 2022, 7:39:24 PM2/28/22
to XMPie Interest Group
Thnks for your help. I will certainly give it a try!

Best regards,

Réal Cantin

unread,
Mar 1, 2022, 9:19:57 AM3/1/22
to XMPie Interest Group
This piece of code is awsome! Thank M. Couch.

Le lundi 28 février 2022 à 18:45:01 UTC-5, couch a écrit :

Wayne

unread,
Mar 3, 2022, 5:28:16 AM3/3/22
to XMPie Interest Group
If you have some knowledge of PostScript and are prepared to use PostScript output for your composition.
Then you can use the Media Selection option to accomplish what you require for variable pages per recipient.
A pure Postscript barcode generator can be found at https://bwipp.terryburton.co.uk/

Regards,
Wayne

Réal Cantin

unread,
Mar 4, 2022, 9:36:57 AM3/4/22
to XMPie Interest Group
Thanks Wayne,

I will have a look at this!

couch

unread,
May 10, 2022, 7:35:04 PM5/10/22
to XMPie Interest Group
Regarding the request to have running number across the entire print job for use in inserter barcodes - XMPie has heard your voice and the latest v11.2 has new state variables in the page numbering barcode that will now do this. https://campus.xmpie.com/eLearning/ucreate-print-training/page-numbering-barcode
Reply all
Reply to author
Forward
0 new messages