View Single Post
  #1  
Old June 13th, 2022, 11:30 AM
ReminderVDP ReminderVDP is offline
Regular Contributor
 
Join Date: Jan 2013
Location: King of Prussia, PA
Posts: 138
Default QR code Returning Graphic when Field is Empty

I am generating QR codes for the front and back pieces of artwork using the Graphic Rule QR Barcode. I created the rule and added the box to the artwork pages. It is appearing on a record where the field that is generating the QR code is blank in the data. Why is the QR code still generating when there is no data in the field? The code from the Rule is below.

Code:
// Rule converted from XML Template "QR Barcode: qrShortUrl":
// Choose the following values:
// Begin XML Template selections //
var RuleOrFieldToEncode = "qrShortUrl"; // "Data field or rule to encode" (Required): FieldOrRuleList
var EncodingMode = "Byte"; // "Encoding mode" (Required): PickList ["Byte" (All characters), "AlphaNumeric" (Alphanumeric only), "Numeric" (Numeric only)]
var ErrorCorrectionMode = "Q"; // "Error correction" (Required): PickList ["L" (Low), "M" (Medium), "Q" (Quality), "H" (High)]
var PreferredFormat = "0"; // "Format (symbol size)" (Required): PickList ["0" (0 (automatic)), "1" (1 (21x21)), "2" (2 (25x25)), "3" (3 (29x29)), "4" (4 (33x33)), "10" (10 (57x57)), "40" (40 (177x177))]
var ProcessTilde = false; // "Process tilde (~) escapes": CheckBox
var foreColor = "Black"; // "Barcode color (optional; defaults to Black):": ColorList
// End XML Template selections //

var DataToEncode = RuleOrField(RuleOrFieldToEncode);
return MakeQRBarcodeGraphic(DataToEncode, ProcessTilde,
                            EncodingMode, ErrorCorrectionMode, PreferredFormat, foreColor);
__________________
Bryan Mathes, Print Production Specialist
FusionPro Designer 10.1.11, FusionPro Producer (Server) API 10.1.11
Mac OSX 10.12.6
Mac Pro 2.8 GHz Quad Core Intel Xeon
Reply With Quote