Copy link to clipboard
Copied
Hi,
I have written a script to auto populate a 5th field, I have 4 fields each with less that 20 to be put into them, if all 4 fields have less that 20 (each) then the 5th field is populated with Pass, if any of the 4 fields have more that 20 in it then the 5th field is populated with fail.
I works sort of because if I change the value of var d then I can get pass or fail into the 5th field, if I change any of the other fields there is no change to the 5th field
Can someone help, please
var a = getField("450").value;
var b = +getField("350") .value;
var c = +getField("250").value;
var d = +getField("stroke end0").value;
if (a,b,c,d<=20) {
event.value = "Pass";
} else {
event.value ="Fail";
}
Thank you
Replace this line:
if (a,b,c,d<=20) {
With this:
if (a<=20 && b<=20 && c<=20 && d<=20) {
Copy link to clipboard
Copied
Replace this line:
if (a,b,c,d<=20) {
With this:
if (a<=20 && b<=20 && c<=20 && d<=20) {
Copy link to clipboard
Copied
Hi try67,
Thank you ! struggled for days with that.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now