Regex example: Removing the start of serial numbers that are too-long

Dynamics GP limits the length of serial numbers to 20 characters. However, there are several situations where a vendor will attach a barcoded serial number that is longer than this limit. PanatrackerGP has the power to trim these barcodes so that they can still be used with GP.

In most cases, the most important data in a too-long serial number is found at the END of the barcode, so it’s likely you will want to trim away the starting characters to that you are left with the last 20 characters. 

Here’s an example of how to accomplish this.

From the PanatrackerGP web portal, navigate to the System Settings page and expand the Barcode Control panel:
   a)  Set the Enable Regex Features setting to TRUE.
   b)  Carefully enter the following in the Data Pattern Serial Field setting”   (.{0,20}$)
   c)  Restart the handhelds to accept the above change, then confirm that the extra leading characters are removed in the relevant transactions.

PanatrackerGP’s pattern matching capabilities have a lot of power to solve these common problems. Our consulting team can help you with other scenarios. 

Was this helpful?