Jump to content

Trouble Creating Complex 128 Barcode Rule


Recommended Posts

Posted

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 " ";

Posted

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

Posted

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!

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...