Validating User Input
I am currently setting up some new labels for a Medical Device application. I'm looking for some help in validating user input. I request a Lot Number from the user and I would like the user to have to enter it twice so the program can check if the entry is correct by comparing values. Does anyone know how this could be done?
The other question, which is more of a nice to have is for the program to dynamically print a date on the labels NOT equal to the present date. I would like it to print an expiration date one month less then the month it prints, and three years in the future. So if I printed today I'd like it to print 2015-03. Anyone know how this could be set up?
Thanks,
Julian
The other question, which is more of a nice to have is for the program to dynamically print a date on the labels NOT equal to the present date. I would like it to print an expiration date one month less then the month it prints, and three years in the future. So if I printed today I'd like it to print 2015-03. Anyone know how this could be set up?
Thanks,
Julian
0
-
Julian,
All of that can be done using VB scripting. Every BarTender format has VB scripts that can be set up to run at various times. Including directly after a prompt.
To get to these general scripts, simply browse to File > BarTender Document Options (Might be called "Label Format Options" in 9.4-). You can write a script in one of these events (like OnIdenticalCopies) that will run after a prompt and can compare your two data fields entered.
For your automatic date. That's even easier. BarTender's date function can be "offset" a certain amount of time. Simply set your offset (Found under the transforms tab in v10) to 35 months.
Alternatively, you could script it using the DateAdd() VB function in a VB script as the data source for that particular field in BarTender: www.w3schools.com/vbscript/func_dateadd.asp - However, that seems more complex than your actual needs.0
Please sign in to leave a comment.
Comments
1 comment