S_Black Posted December 4, 2015 Share Posted December 4, 2015 (edited) 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 December 4, 2015 by S_Black additional information. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted December 7, 2015 Share Posted December 7, 2015 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) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.