# Decoding a GS1 Barcode Group Separator

**URL:** <https://forum.novacura.com/t/decoding-a-gs1-barcode-group-separator/311>\
**Category:** Flow Classic\
**Created:** [October 6, 2022, 11:53am UTC](https://forum.novacura.com/t/decoding-a-gs1-barcode-group-separator/311 "2022-10-06T11:53:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveBagwell](https://avatars.discourse-cdn.com/v4/letter/s/7C9FD7/32.png) [@SteveBagwell](https://forum.novacura.com/u/SteveBagwell)\
**Post date:** [October 6, 2022, 11:53am UTC](https://forum.novacura.com/t/decoding-a-gs1-barcode-group-separator/311/1 "2022-10-06T11:53:22Z")

</div>

I need to decode the following which is returned from a barcode scan in a Flow Text Input field…

01037602085300401724030010VAB21334J – No Escape Sequences are Visible

Only searching for the possible variable length (AI) application identifiers, (10) and (21), the possible decoding results could be…  
(01)03760208530040(17)240300(10)VAB(21)334J – (10)Lot Number and (21)Serial Number identified - ‘21’ could be seen as the AI (21).  
Or  
(01)03760208530040(17)240300(10)VAB21334J – Only a (10)Lot Number identified – ‘21’ could be seen as a part of the Lot Number.

I would only know which one is correct depending on the presence of the [FNC1]…  
01037602085300401724030010VAB[FNC1]21334J  
With the [FNC1] escape present, this would return…  
(01)03760208530040(17)240300(10)VAB(21)334J  
because I know where the variable length characters after the AI (10) ends.

Or  
01037602085300401724030010VAB21334J  
With no [FNC1] escape present, this would return…  
(01)03760208530040(17)240300(10)VAB21334J

I’m having no luck with returning any escape sequences from the barcode.  
I believe it might be \F that represents the [FNC1] that indicates the end of variable length segments.

The customer uses various industry standard barcode scanners.

Is there something fundamental I’m missing in trying to return and translate the escape sequences from the barcode into a Flow Text Input field?

---

<div class="post-metadata">

**Author:** ![Jostde](https://avatars.discourse-cdn.com/v4/letter/j/7C9FD7/32.png) [@Jostde](https://forum.novacura.com/u/Jostde)\
**Post date:** [October 6, 2022, 12:20pm UTC](https://forum.novacura.com/t/decoding-a-gs1-barcode-group-separator/311/2 "2022-10-06T12:20:26Z")

</div>

Hey Steve,

if the escape character is part of the barcode it should be transmitted to the flow input field, but you will not be able to see it. Have you tried using Flowscript and search for chr(27) (which should be the escape character)?  
When processing the input you can search for Chr(27) with e.g. the Instr Function and depending on wether you find it or not built your logic to get the individual flow values.

You can also copy the input and paste the flow input value to an ASCII converter online (e.g. [Convert a String to ASCII Code - Online String Tools](https://onlinestringtools.com/convert-string-to-ascii)) to figure out the correct codes for any seperators/markes. Using Chr(xx) and the corrcect ASCII value will usually work.

Regards,

Johannes

---

<div class="post-metadata">

**Author:** ![Jostde](https://avatars.discourse-cdn.com/v4/letter/j/7C9FD7/32.png) [@Jostde](https://forum.novacura.com/u/Jostde)\
**Post date:** [October 6, 2022, 12:24pm UTC](https://forum.novacura.com/t/decoding-a-gs1-barcode-group-separator/311/3 "2022-10-06T12:24:37Z")

</div>

Something like this:

```auto
If instr('MyString', chr(27)) > -1 {
//' Logic for including escape character here'
}
else
{
//' Logic for excluding escape character here'
}

```

---

<div class="post-metadata">

**Author:** ![SteveBagwell](https://avatars.discourse-cdn.com/v4/letter/s/7C9FD7/32.png) [@SteveBagwell](https://forum.novacura.com/u/SteveBagwell)\
**Post date:** [October 6, 2022, 3:14pm UTC](https://forum.novacura.com/t/decoding-a-gs1-barcode-group-separator/311/4 "2022-10-06T15:14:54Z")

</div>

Many thanks Johannes, I’ll give that a try.

---

<div class="post-metadata">

**Author:** ![SteveBagwell](https://avatars.discourse-cdn.com/v4/letter/s/7C9FD7/32.png) [@SteveBagwell](https://forum.novacura.com/u/SteveBagwell)\
**Post date:** [October 6, 2022, 3:15pm UTC](https://forum.novacura.com/t/decoding-a-gs1-barcode-group-separator/311/5 "2022-10-06T15:15:28Z")

</div>

Many thanks again Johannes.

---

<div class="post-metadata">

**Author:** ![Jostde](https://avatars.discourse-cdn.com/v4/letter/j/7C9FD7/32.png) [@Jostde](https://forum.novacura.com/u/Jostde)\
**Post date:** [October 13, 2022, 10:39am UTC](https://forum.novacura.com/t/decoding-a-gs1-barcode-group-separator/311/6 "2022-10-13T10:39:00Z")

</div>

No problems Steve. Did it work though? 🙂

---

<div class="post-metadata">

**Author:** ![SteveBagwell](https://avatars.discourse-cdn.com/v4/letter/s/7C9FD7/32.png) [@SteveBagwell](https://forum.novacura.com/u/SteveBagwell)\
**Post date:** [October 14, 2022, 12:55pm UTC](https://forum.novacura.com/t/decoding-a-gs1-barcode-group-separator/311/7 "2022-10-14T12:55:26Z")

</div>

Hi Johannes,

I’m waiting for my customer to provide some more information.  
I’ll try to remember to let you know how it does.

Many thanks,

Steve
