Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

how to add a data matrix barcode in designer forms

Not applicable
Hi im new to livecycle designer. I need to create a form with DataMatrix ECC200 barcode using livecycle designer. Could you please explain me how to set the value of the barcode using xml values. And could you please explain how to set the object details of the barcode.. Its very urgent..



Thanks in advance..
3 Replies
Steve_L_Walker
Level 10
Level 10
If you are referring to the DataMatrix barcode symbology associated with the PaperFormsBarcode object, the formatting and content of the value encoded in a barcode depends upon the requirements on the 'back-office' side. In other words, a process consumes the data after the paper form is scanned and a barcode is decoded. You should map the barcode in the form to the data requirements in that process, whatever that process may be.<br /><br />The following custom script on a barcode calculate event will capture the relative form fields and encode the barcode as XML. The script replaces automatic scripting.<br /><br />form1.page1.subform1.barcode::calculate - (application/x-javascript, client)<br /><br />var str = '<?xml version="1.0"?>' <br />+ "<customer>"<br />+ "<name>" + form1.page1.subform1.name.rawValue + "</name>"<br />+ "<city>" + form1.page1.subform1.city.rawValue + "</city>"<br />+ "<state>" + form1.page1.subform1.state.rawValue + "</state>"<br />+ "<zipCode>" + form1.page1.subform1.zipCode.rawValue + "</zipCode>"<br />+ "</customer>";<br /> <br />this.rawValue = str;<br /><br />Steve
kruthis
Level 1
Level 1

walker,

     I am having a xdp file for which i have data connection and a xml mapping. I need to encode some of the values from the xml and some fields that present in the xdp form. Im using collection to encode the field that present in the xdp by Automatic scripting. How i have to change the script to encode some of the values that is present in the xml?

Its a bit urgent..

Thanks in advance

Kruthis

leesutton
Level 4
Level 4

If you are using a collection and the data you need to include is not listed in the collection object list then I would suggest creating hidden fields on your form that are bound to your datasource.  This would allow you to easily encode them into your barcode using the automated scripting.

Outside of that you will need to use custom code as demonstrated by Steve in the previous post.