Issue Creating 2D Barcode for Neopost Inserter

We are in the process of migrating from PP7 to PP Connect. We currently use a process in our PP7 Designer to print a 2D data matrix barcode on the front of each page for our inserter to match pieces. The data that the 2D barcode holds is an 8 digit number.

I am not familiar with JavaScript (or the new setup of PP Connect, really) so I have been unable to take our current process and migrate it to PPC.

Here is an example of the PlanetPress Talk code that we use for a counter that is used in the barcode and the additional 4 digits based on first page/second page.

Counter:

if(&sSetCount=0)

&sSetCount:=99
else
&sSetCount:=&sSetCount-1
endif

Page info:

&sBCFullSequence:=''

if(&Current.printpagename=‘Page1Front’)
&sBCFullSequence:=‘0102’+right(‘00’+inttostr(&sSetCount), 2)
elseif(&Current.printpagename=‘Insert1Front’)
&sBCFullSequence:=‘0202’+right(‘00’+inttostr(&sSetCount), 2)

I have found a few topics where similar questions were asked but I was not able to take the responses from those topics and implement a solution.

I have tried going the route of ‘Add Additional Content’ and then selected the data matrix barcode. I have been able to set my condition so that the barcode would only display on the front of each page. I have not been able to get the barcode to contain the necessary data or counter.

Any help would be appreciated.

Hi Scotty,
You are on the right track by using the Additional Content in the Output Preset to generate the QR Code barcode on the fly. As you said, the tricky part is constructing your text using variables, static text and Metadata.
You create a variable in your record layout in the Data Mapper, which you then assign a value. Then you use the Job Preset to add that data value to the Metadata, and call that value back in your Output Preset in the text:

For example: ${document.metadata.TempStore}${document.sequence.job,‘0000’}${sheet.sequence.document%10} 0.

Variables like document.sequence.job and sheet.sequence.document are internal variables used by Connect and formatting can be applied to them to specify how many characters to show or how they increment. More information on them can be found here:

PReS Connect 2019.2 User Guide?