Strip certain characters
I have a form field I want to control what a user can enter. It's for a blood product unit number.
The format will always be:
W1202 follow by the last 2 digits of the year 14 followed by 6 numbers 123456
Final entry W120214000001.
That is what the unit number will look like - eye readable. The issue I have is that there is also a barcode and it's obviously easier for staff to enter it accurately if the scan it.
The barcode has start (=) and stop (00) characters, so in this example it would look like =W12021400000100.
Is there a way to detect if the first character is an = and strip it, preferably on the form? Then, if it is over 13 character and the last 2 character are 00, strip those as well? And while we are at it, make sure the unit number is a total of 13 consecutive characters? ![]()
Your guidance is greatly appreciated.