How do I create a Select Case type Calculated Field
i have 2 variables need use both formfields.
course credit hours - text field - variables 4.0, 3.0, 2.0, etc
course grade - dropdown field - values are: a, a-, b+, b, b-, etc
i need create result in third field calculation of like:
select case (grade)
case "a"
4*hours
case "a-"
3.7*hours
case "b+"
3.3*hours
case "b"
3*hours
.....
is possible? in advance!
you can use custom calculation script of third text field:
var hours = number(this.getfield("course credit hours").value);
var grade = this.getfield("course grade").value;
if (grade=="a") event.value = hours * 4;
else if (grade=="a-") event.value = hours * 3.7;
// etc.
else event.value = "";
More discussions in PDF Forms
adobe
Comments
Post a Comment