I have constructed the string required to generate my Datamatrix barcode. I am stuck on creating a digit that will represent the first digit in the string.
The first digit needs to be a 2 on the first page of a document, a 1 on the last page of the document, and a 0 on all pages in-between.
This creates a 1 or a 2 but I don’t know how to make it a 0 on all pages in-between
Thank you so much for the response. I cut and past the expression you recommended . I am getting a parse error in column 47 (near ‘’'). It feels so close.
Use double quotes instead of those funky single quotes that the web page used. ${var w = (page.nr == document.count.pages) ? "1": (page.nr == 1) ? "2" : "0" ; w;}