Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Barcodes

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 14th, 2014, 03:09 PM
wptucson wptucson is offline
Forum n00b
 
Join Date: Nov 2013
Posts: 9
Default Trouble Creating Complex 128 Barcode Rule

I'm trying to create a 128 barcode with the following information and am not getting the correct output. I'm sure there is something incorrect in my code but I can't figure out what it is... Can someone please point me in the right direction?

The field "XPN" dictates the information to be used for the barcode.
Here is the code:

if (Field("XPN") == "70-0024-012")
return Make128Barcode("M00582040", true);

else if (Field("XPN") == "70-0024-014")
return Make128Barcode("M00582050", true);

else if (Field("XPN") == "70-0024-016")
return Make128Barcode("M00582060", true);

else if (Field("XPN") == "70-0024-018")
return Make128Barcode("M00582070", true);

else if (Field("XPN") == "70-0024-020")
return Make128Barcode("M00582080", true);

else if (Field("XPN") == "70-0024-022")
return Make128Barcode("M00582860", true);

else if (Field("XPN") == "70-0024-024")
return Make128Barcode("M00582090", true);

else if (Field("XPN") == "70-0024-028")
return Make128Barcode("M00582100", true);

else
return " ";
Reply With Quote
  #2  
Old February 17th, 2014, 02:18 AM
blackbelt60 blackbelt60 is offline
Junior Community Member
 
Join Date: Oct 2013
Posts: 17
Default Re: Trouble Creating Complex 128 Barcode Rule

Hello.
I would do this:

var Var6 = "IDAutomationC128L";
final_data = "";

if (Field("nbr") == "70-0024-012")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582040")) + '</span>';

else if (Field("nbr") == "70-0024-014")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582050")) + '</span>';

else if (Field("nbr") == "70-0024-016")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582060")) + '</span>';

else if (Field("nbr") == "70-0024-018")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582070")) + '</span>';

else if (Field("nbr") == "70-0024-020")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582080")) + '</span>';

else if (Field("nbr") == "70-0024-022")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582060")) + '</span>';

else if (Field("nbr") == "70-0024-024")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582090")) + '</span>';

else if (Field("nbr") == "70-0024-028")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582100")) + '</span>';

else
return " ";


------------------------
"nbr" is the field name...
Also, please remember to tick the "return as tagged text" cell before saving the rule.
Ciao Maurizio
__________________
VDP Creator 9.03
Acrobat X PRO
O.S Win7 Enterprise SP1
Reply With Quote
  #3  
Old February 17th, 2014, 09:59 AM
wptucson wptucson is offline
Forum n00b
 
Join Date: Nov 2013
Posts: 9
Default Re: Trouble Creating Complex 128 Barcode Rule

Thanks blackbelt60!

It turns out the particular barcode that I'm looking for is specific to the health industry (HIBC) and not the typical 128 barcode. That explains why it wasn't showing the correct output!
Reply With Quote
Reply

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 10:02 PM.


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