Jump to content

Data Matrix Barcode help


S_Black

Recommended Posts

I need a little assistance with the MakeDataMatrixBarcode Function. Here is the code I currently have

var ID = Field("Partner ID")
var Appeal = Field("Appeal")
var Segment = Field("AppealSegment")
return MakeDataMatrixBarcode (ID+"  "+Appeal+"  "+Segment+"  ", true, "ASCII", 4, 7)

Specifically I need to know how to input a tab into the fields. It needs to be a horizontal tab of ASCII value 09. If I manually place a tab " ", the rule editor converts it to double-spaces.

 

Any assistance would be greatly appreciated.

 

Edit: I read the System Guide for this function, and used the requested "~009", but the string (ID+~009+Appeal+~009+Segment+~009, true, "ASCII", 4, 7) doesn't come through correctly.

Edited by S_Black
additional information.
Link to comment
Share on other sites

Specifically I need to know how to input a tab into the fields. It needs to be a horizontal tab of ASCII value 09. If I manually place a tab " ", the rule editor converts it to double-spaces.

The way to encode a tab character in JavaScript is either "\t" or String.fromCharCode(9). You can also use FusionPro's Chr helper function, e.g. Chr(9).

Edit: I read the System Guide for this function, and used the requested "~009", but the string (ID+~009+Appeal+~009+Segment+~009, true, "ASCII", 4, 7) doesn't come through correctly.

You can use the tilde escapes (since you have the second parameter of the function set to true to enable them), but you still need to specify them as strings to the function by quoting them:

return MakeDataMatrixBarcode(ID+"~009"+Appeal+"~009"+Segment+"~009", true, "ASCII", 4, 7)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...