Maybe you understand the title, may be not. I will try to explain. Solving this "equation" took me few hours to solve, lead to one Microsoft technical incident and may be will lead to some hotfix, if possible at all.
If you live in EU, may be you know that FMD mean "Falsified Medicine Directive" - EU directive, under which the medicines must be validated/reported in whole array from manufacturers to "end-users" (you) when you go to pharmacy to buy something. Base of this solution are barcodes which are standard GS1 barcodes. You can hit GS1 barcode nearly everywhere todays, not only in pharmacy, but warehouses, manufacturers etc. This standard is using character GS (ASCII 29, Group Separator) as a "group separator", it means to separate for example Lot No. from rest of the code (one code includes multiple information with prefixes, fixed size or variable size with separator to mark end of the part). And this character is making problems.
The whole story
We have created solution for the FMD for NAV/BC and we went live. But after than, the users were unable to scan the barcodes correctly. After some detective work we have found that the character GS is not entered into the Text Box in NAV. Accidentally I was going though Microsoft KBs for the CUs for NAV and hit this bug fixed in CU37 for NAV 2016 (CU24 for NAV 2017 and CU11 for NAV 2018):
282930 A non-visible character separator from the standard pharmaceutical barcode is trimmed when it is scanned in a Page Text field.
Super! We can solve this with applying the CU!
We updated the system and still were unable to scan the code correctly. I did some research and created support incident with Microsoft, which took my good friend Duilio, sending me more info about this bug. What I have found:
- ASCII 29 is ignored from keyboard in windows and web client (try to enter ALT+029)
- ASCII 29 is not ignored if passed through clipboard (enter the ALT+029 e.g. into notepad++ or PSPad or anything, mark, copy, paste) - this is the fix in the CU, it was not possible before the fix
It means, scanner will send it but textbox will filter this character out.
How to solve this? Answer is ADF - Advanced data formatting - functionality of the scanner (if it supports it). Used barcode scanner was Symbol DS4608 which support ADF. You can program the scanner through app or by scanning special barcodes. I recommend to use the app to create barcode for you to program the scanner. The way could be different for each scanner.
For my Symbol I needed to create this ADF rules:
1) Move to all patterns and replace <<GS>> with <|>
2) Skip to start
3) Send all that remains
This ADF rule with 3 action will solve the problem, because now we get char | instead GS, which will be passed to NAV/BC correctly. You can choose any other character you want and align the program code for splitting the value into separate fields. Through ADF you can even split the code and send only the LOT No. if you want. But just replacing the char is enough.
Using ADF could be useful not only because FMD, but everywhere you are working with GS1 code or another code with non-printable characters.