Is it poosible to put a check in a batch editing program to check for any duplicate serial number in a roster entered by the keyer during entry
Thanks
Tshering
Duplicate serial number
Re: Duplicate serial number
You could use the count function with "where" to get the number of rows in the roster with the same serial number as the serial number of the current row. Something like:
Another option is to set the SEQUENTIAL property on the serial field and have CSEntry fill it in automatically. If you do this you can also make the field protected so that the user cannot change it. That way you can never duplicate serial numbers.
PROC SERIAL
if count(MYROSTER000 where SERIAL = SERIAL(curocc())) > 1 then
errmsg("Duplicate serial number");
endif;
Here serial(curocc()) is the serial number of the current row so the count() will return the number of rows whose serial matches the one that was just entered. If the result is greater than 1 then this is a duplicate.if count(MYROSTER000 where SERIAL = SERIAL(curocc())) > 1 then
errmsg("Duplicate serial number");
endif;
Another option is to set the SEQUENTIAL property on the serial field and have CSEntry fill it in automatically. If you do this you can also make the field protected so that the user cannot change it. That way you can never duplicate serial numbers.
-
- Posts: 12
- Joined: July 4th, 2017, 4:21 am
Re: Duplicate serial number
Thank u so much