New User? Sign Up  |  Sign In  |  Help
Barcode support and
tutorials from IDAutomation
and the community.
Click for the BBB Business Review of this Computers Hardware, Software & Services in Tampa FL
Resolved Questions

Trouble with 23n Variable length field


We have a barcode that needs to conditionally display the sub lot field as the AI 235 - 23n type field but am having trouble getting it to work.

When we use this logic, it fails.

DataToEncode = "~212"+"01"+cstr({ITMMASTER.EANCOD_0})+"17"+totext({STOLOT.SHLDAT_0},"yyMMdd")+"10"+cstr({STOJOU.LOT_0})+ "Ê"+"(235)"+cstr({STOJOU.SLO_0})


This part of the code is working as we have tested this by itself.

DataToEncode = "~212"+"01"+cstr({ITMMASTER.EANCOD_0})+"17"+totext({STOLOT.SHLDAT_0},"yyMMdd")+"10"+cstr({STOJOU.LOT_0})


When we look at the data of the SLO field, it is "00001". Can anyone provide any feedback on how to improve it?

We are using the Barcode Generator for Crystal Reports with the Code 128 & GS1-128 version. Specifically the IDAutomation Native - GS1-128 with HRI file.


Application: Crystal Reports

11-13-20     4 year(s) ago    

  Report Abuse

 

Brant

Best Answer

The product will encode what you provide for the DataToEncode. It is up to the GS1 rules and the scanner decoding the barcode to parse it out. We offer examples of this at the GS1 AI page. So to show you how to encode the FNC1 is about the extent of the support we can provide. You can test decoding the GS1 barcodes by using the Barcode Decoder Verification App, which verifies FNC, AI, and Element Strings.

Posted 4 year(s) ago

(0)
(0)
  Report Abuse
 
Find Interesting
 
Email to Others
 
Bookmark
 
Subscribe to Answer Alert
No comments yet.     Be the first to comment.
Other Answers (7)
Hi Ben,

I found I get a good result if I change the AI to a 2 digit such as 21. See below.

image
DataToEncode = "~202"&"01"+"50092311220952"&"17"&"991231"&"10"&"201112-060"&"Ê"&"21"&"00001"


If I use a 3-digit AI such as 235 (5-digit 23n type AI), then it does not provide a good result. Can you please help me with this?

image
DataToEncode = "~202"&"01"+"50092311220952"&"17"&"991231"&"10"&"201112-060"&"Ê"&"235"&"00001"

Posted 4 year(s) ago

(0)
(0)
   Report Abuse
The barcode with sublot scans as :
01500923112209521799123110201112-060<0x1D>23500001

The barcode without sublot scans as:
(01) 50092311220951
(17) 201212
(10) 201112-059

Posted 4 year(s) ago

(0)
(0)
   Report Abuse
Hi Brant,

Thanks for the feedback! Are you able to confirm if everything is working appropriately for both images? I have a scanning app to test but want to make sure since it is displaying it a bit differently for both.

With sublot:
image

Without sublot:
image

Posted 4 year(s) ago

(0)
(0)
   Report Abuse
Try it using ~202 instead of Ê.

Posted 4 year(s) ago

(0)
(0)
   Report Abuse
Ignore the previous post as it was sent incorrectly.

Here is what I tried with the static data:
"~202"&"01"+"50092311220952"&"17"&"991231"&"10"&"201112-060"&"Ê"&"235"&"00001"

I went step by step and found that all of these parts work fine:
"~202"&"01"+"50092311220952"&"17"&"991231"&"10"&"201112-060"

The problem is the last field, the sublot (AI 235).
"Ê"&"235"&"00001"

Note that AI 10 and AI 17 are both variable-length fields. I added the Ê between them based on the chart 3 scenarios in the following link but still cannot get it to work.

https://www.barcodefaq.com/barcode-properties/definitions/gs1-application-identifiers/#variable_length_element_string

Posted 4 year(s) ago

(0)
(0)
   Report Abuse
Hi Brant,

I tried that and now eliminated the AI 235.

"Ê"+"(235)"+"

AI 10 and 235 are variable length fields, so I added the Ê between them as such

Here is what I tried with the static data:
"~202"&"01"+"50092311220952"&"17"&"991231"&"10"&"201112-060"&"Ê"&"235"&"00001"

I went step by step and found that all of these parts work fine:
"~202"&"01"+"50092311220952"&"17"&"991231"&"10"&"201112-060"

The problem is the last field, the sub lot (AI 235).
"Ê"&"235"&"00001"

Note that AI 10 and AI 17 are both variable-length fields. I added the Ê between them based on the chart 3 scenarios in the following link but still cannot get it to work.

https://www.barcodefaq.com/barcode-properties/definitions/gs1-application-identifiers/#variable_length_element_string

Posted 4 year(s) ago

(0)
(0)
   Report Abuse
I recommend trying only static data and using & instead of + and ~202 instead of ~212 such as:
DataToEncode = "~202" & "01" & "34567890123457" & "17" & "991231" & "10" & "12345678"
If that encodes properly, use a process of elimination one field at a time to find the problem.

Posted 4 year(s) ago

(0)
(0)
   Report Abuse
Email this question link to friends
You must enter an email address, if name is entered or vice-versa for each friend.
Friend #1 -
Friend #2 -
Friend #3 -
Friend #4 -
Friend #5 -
  Your comment on this question
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allows to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must starts with "http://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always starts with " http:// ")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 Characters are allowed. Current Count: 0
  Your comment on this answer
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allow you to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must start with "http://" or "https://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always start with "http://" or "https://")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 characters are allowed. Current Count: 0

You may answer and comment on any thread according to the Terms and Conditions.

 © Copyright 2021 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us
Training Videos on YouTube Join us on Google Plus Join us on LinkedIn Follow us on Twitter Like us on Facebook