Copy link to clipboard
Copied
All,
I am trying to figure out how to sum fields 1-14 and then multiply that by 2.20462 essentially the sum of kilograms and then convert it to lbs. Is there a way to do this?
Thanks,
-J
Use this code as your custom calculation script:
var total = 0;
for (var i=1; i<=14; i++) {
var f = this.getField("10 MARKED WEIGHT OF LOTRow"+i);
total+=Number(f.value);
}
event.value = total * 2.20462;
Copy link to clipboard
Copied
Are the field names actually "1", "2", "3"... "14"?
Copy link to clipboard
Copied
Sorry the fields are 10 MARKED WEIGHT OF LOTRow1-10 MARKED WEIGHT OF LOTRow14 and I would like to have the final amount in LBS calculated in field 10 MARKED WEIGHT OF LOTRow15
Copy link to clipboard
Copied
Use this code as your custom calculation script:
var total = 0;
for (var i=1; i<=14; i++) {
var f = this.getField("10 MARKED WEIGHT OF LOTRow"+i);
total+=Number(f.value);
}
event.value = total * 2.20462;
Copy link to clipboard
Copied
Simply amazing. I wish I know programming. You're 2 for 2! Thank you!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now