Page 2 of 2
Re: restrict barcode
Posted: February 21st, 2017, 4:53 pm
by Gregory Martin
Ah, you're right. I didn't read the post as thoroughly as I should have. My code will not allow 0xxxx values through.
Re: restrict barcode
Posted: April 20th, 2017, 7:38 am
by Show87
HELLO
I want to restrict barcode number to only allow Alphanuremic that starts with "N123456"
so that captures cant enter any numbe
I tried this code
if QI2A[1] <> "N" then
errmsg("Le numero BVM doit commencé par N");
reenter;
endif;
But it does not work.
The error message appears even when entering the "N"
Re: restrict barcode
Posted: April 20th, 2017, 7:53 am
by Gregory Martin
string_variable[1] will return the whole string, starting at position 1. You want to check just the first character, which you can do like this:
if QI2A[1:1] <> "N" then
Re: restrict barcode
Posted: April 20th, 2017, 8:08 am
by Show87
Thank you very much Greg
Re: restrict barcode
Posted: April 20th, 2017, 8:11 am
by Show87