These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Barcode order

amin.nas
Registered: Oct 3 2007
Posts: 37

I designed a form with LiveCycle Designer which includes a barcode. How can I set the order in which fields are encoded into the barcode?
When I scan it into an excel sheet, fields come in random order.

My Product Information:
LiveCycle Designer, Windows
sconforms
Expert
Registered: Jul 10 2007
Posts: 92
Unfortunately, there's no "official" way in which you can specify the order in which fields get encoded into a 2D ("Paper Forms") Barcode. This means that the recommended way to ensure a specific order would be to write your own encoding script in the barcode's Calculate event.

The "random order" which you mention is likely the order in which the fields appear in the Hierarchy palette if the barcode's encoding option is "Entire Form Data". You can re-order fields in the Hierarchy palette however this will affect the tabbing order. If that's not important to you, then simply dragging and dropping the fields in the hierarchy could solve your problem.

That being said, it [i]appears[/i] that when you create a Form Object Collection and use that as the source of the set of fields to encoded in the barcode, field references are added to the collection in the order in which you pick them in the Form Object Collection Editor. As far as I can tell, the default encoding algorithm (which you can see in the barcode's Calculate event when you select the Collection encoding option), encodes fields in the order in which they are specified in the collection.

The conclusion? If changing the order in which fields appear in the Hierarchy palette doesn't solve your problem, you [i]may[/i] be able to specify order by using a collection however I wouldn't call this a definite solution as this could change in the future. The best way to ensure this keeps on working in future versions of Acrobat (as the script is ultimately executed in Acrobat) would be to write your own encoding script.

Stefan Cameron obtained his bachelor's degree with Honors in Computer Science at the University of Ottawa and is a Computer Scientist working on Adobe's LiveCycle server products, in particular on LiveCycle Designer ES for the past 5 years.