Go Back   PTI Marketing Technologies User Community > Support > Issues, Questions, Etc.

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 11th, 2016, 03:01 PM
benjaminleebates benjaminleebates is offline
Forum n00b
 
Join Date: Dec 2012
Posts: 4
Default Multiple fields in data matrix

So I am attempting to create Data matrix barcodes. I need the code to have four fields from a spreadsheet in each code, with a comma between each piece of data. An example of the code to be encode would be "2,25,62076,3" without the quotes of course...
Each of these values are being pulled from a different field (column) and the comma does not exist in the csv file.
Any help would be greatly appreciated.
Reply With Quote
  #2  
Old January 11th, 2016, 03:17 PM
Alex Marshall's Avatar
Alex Marshall Alex Marshall is offline
FusionPro VDP Support
 
Join Date: Sep 2008
Location: Chicago,Illinois
Posts: 378
Default Re: Multiple fields in data matrix

Creating a Data Matrix barcode is simple. You have to know which encoding mode you need and use it in the script.
Here is the syntax:

return MakeDataMatrixBarcode(DataToEncode, ProcessTilde, EncodingMode,PreferredFormat, PointSize, NoFontTag, Font)

So click “Create Rules>>New(text)>>>Empty Rule. Give the Rule a name.
Enter the code. Change the fieldname to match your data file.

var dataforbarcode = Field(“mydatafield”);//etc…
var dmbarcodeobj = new DataMatrixBarcode;
dmbarcodeobj.encodingmode = "base256";
dmbarcodeobj.pointSize = 12;
return dmbarcodeobj.Make(dataforbarcode);

• Data – The data that will be encoded. This can be one or more fields from your data, a result of another rule, etc.
• Process Tilde – When set to "true", the format ~ddd is used to specify the ASCII code ofthe encoded character. For example, if the following text is entered in the Data field,
~029AB it will be encoded as GSAB where GS is a delimiter ASCII 29 character. This can be used in a single string to encode GS and RS characters (GS = ASCII 29 and RS =ASCII 30). Other commonly used ASCII codes are ~009 for a tab and ~013 which is a return function. These are useful when encoding multiple fields in a single symbol. Thedefault is false.
• Encoding Mode –
There are four encoding methods:
• ASCII – encodes data that contains the first 128 ASCII characters.
• C40 – encodes data that contains numeric and upper case characters.
• TEXT –encodes data that contains both numeric and lowercase characters.
• BASE256 – encodes 8 bit values.


Now insert this Rule from the “Variable” drop box in the Variable Text Editor.
Do not apply the font. The script will return the font. Test and compose.
Reply With Quote
  #3  
Old January 11th, 2016, 03:24 PM
benjaminleebates benjaminleebates is offline
Forum n00b
 
Join Date: Dec 2012
Posts: 4
Default Re: Multiple fields in data matrix

Interesting...
I'm sure my attempt is not as elegant, but it got the result...
return MakeDataMatrixBarcode(Field("Station1") +"," +Field("Quantity1") +"," +Field("Item1") +"," +Field("Building1"), null, null, null, 10)
Could you tell me if your code has something needed that mine does not? I don't want to crash and burn half way thru composing a file...
Reply With Quote
Reply

Tags
data, fields, matrix, multiple

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:17 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.