Answered
print number of copies
Hi
I would like to create a function that allows me to vary the number of copies of a page to print, depending on whether or not the wording "Unemployed" is present in the "PROFESSION-2" field.
This is the function I created but it doesn't work
var pp = this.getPrintParams ();
pp.colorOverride = pp.constants.colorOverrides.blackandwhite;
pp.pageHandling = pp.constants.handling.fit;
pp.printRange = [[30,30]];
var s1 = this.getField ("PROFESSION-2"). value;
if (s1 == "Unemployed") {s1.value = "3";} else {s1.value = "4";}
pp.NumCopies = s1.value;
pp.DuplexType = 1;
pp.printerName = getField ("PRINTER"). value;
pp.interactive = pp.constants.interactionLevel.silent;
this.print (pp);
Can anyone help me please?
