Neal Matthews
9th May 2007, 17:45
Hello,

Nice easy one for the developers here. I've added a password field to the Print Item Data session so that only certain people can print some of our shop floor labels.

Everything works ok in the report script but after printing the password field is still left in the form. What's the best way of clearing this in the report script ? I guess I need to set the variable to "" and display but where do I do this in the program script ?

Cheers
Neal

King Willy
9th May 2007, 17:50
What about...

Choice.cont.process:
after.choice:
password.x=""
display.all()
refresh()

Neal Matthews
9th May 2007, 17:58
Cheers Willy.

Looks goood from here.

george7a
9th May 2007, 18:11
Hi,

It is better to use the display() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_form_and_form_field_operations_display_many) function instead of the display.all(). Example:


choice.cont.process:
after.choice:
password.x=""
display("password.x")

- George

King Willy
10th May 2007, 11:41
you have to put the code after get.screen.defaults() in init.form if you use to let users to save the default options or they will save the password.


Another way is unchecking the standard options 43 and 44 in the form.