## How can I make something not give a result unless all groups are selected?

Participant ,
Oct 17, 2017

Copied

Hi,

Hoping someone with a better brain than me can help with this...

I currently have some Java in an interactive PDF that shows field based on a calculation:

var nResult = this.getField("Comp A total score").value;

if ( nResult > 13 ) {

this.getField("Result Average_CompA Not demonstrating").display = display.hidden;

this.getField("Result Average_CompA Emerging").display = display.hidden;

this.getField("Result Average_CompA Good").display = display.hidden;

this.getField("Result Average_CompA Strong").display = display.hidden;

this.getField("Result Average_CompA Exceptional").display = display.visible;

}

else if ( nResult > 10 ) {

this.getField("Result Average_CompA Not demonstrating").display = display.hidden;

this.getField("Result Average_CompA Emerging").display = display.hidden;

this.getField("Result Average_CompA Good").display = display.hidden;

this.getField("Result Average_CompA Strong").display = display.visible;

this.getField("Result Average_CompA Exceptional").display = display.hidden;

}

else if ( nResult > 7 ) {

this.getField("Result Average_CompA Not demonstrating").display = display.hidden;

this.getField("Result Average_CompA Emerging").display = display.hidden;

this.getField("Result Average_CompA Good").display = display.visible;

this.getField("Result Average_CompA Strong").display = display.hidden;

this.getField("Result Average_CompA Exceptional").display = display.hidden;;

}

else if ( nResult > 4 ) {

this.getField("Result Average_CompA Not demonstrating").display = display.hidden;

this.getField("Result Average_CompA Emerging").display = display.visible;

this.getField("Result Average_CompA Good").display = display.hidden;

this.getField("Result Average_CompA Strong").display = display.hidden;

this.getField("Result Average_CompA Exceptional").display = display.hidden;

}

else if ( nResult > 0 ) {

this.getField("Result Average_CompA Not demonstrating").display = display.visible;

this.getField("Result Average_CompA Emerging").display = display.hidden;

this.getField("Result Average_CompA Good").display = display.hidden;

this.getField("Result Average_CompA Strong").display = display.hidden;

this.getField("Result Average_CompA Exceptional").display = display.hidden;

}

else {

this.getField("Result Average_CompA Not demonstrating").display = display.hidden;

this.getField("Result Average_CompA Emerging").display = display.hidden;

this.getField("Result Average_CompA Good").display = display.hidden;

this.getField("Result Average_CompA Strong").display = display.hidden;

this.getField("Result Average_CompA Exceptional").display = display.hidden;

}

It works absolutely fine...however, I'd like it so it doesn't show any result unless an option from each of three radio button groups is chosen. Is this possible? (The above script looks at this field "Comp A total score" to get the score, which holds the total of "Comp A Group 1" "Comp A Group 2" "Comp A Group 2")

Any ideas??

Thanks

TOPICS
Acrobat SDK and JavaScript, Macintosh, Windows

Views

136

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

## How can I make something not give a result unless all groups are selected?

Participant ,
Oct 17, 2017

Copied

Hi,

Hoping someone with a better brain than me can help with this...

I currently have some Java in an interactive PDF that shows field based on a calculation:

var nResult = this.getField("Comp A total score").value;

if ( nResult > 13 ) {

this.getField("Result Average_CompA Not demonstrating").display = display.hidden;

this.getField("Result Average_CompA Emerging").display = display.hidden;

this.getField("Result Average_CompA Good").display = display.hidden;

this.getField("Result Average_CompA Strong").display = display.hidden;

this.getField("Result Average_CompA Exceptional").display = display.visible;

}

else if ( nResult > 10 ) {

this.getField("Result Average_CompA Not demonstrating").display = display.hidden;

this.getField("Result Average_CompA Emerging").display = display.hidden;

this.getField("Result Average_CompA Good").display = display.hidden;

this.getField("Result Average_CompA Strong").display = display.visible;

this.getField("Result Average_CompA Exceptional").display = display.hidden;

}

else if ( nResult > 7 ) {

this.getField("Result Average_CompA Not demonstrating").display = display.hidden;

this.getField("Result Average_CompA Emerging").display = display.hidden;

this.getField("Result Average_CompA Good").display = display.visible;

this.getField("Result Average_CompA Strong").display = display.hidden;

this.getField("Result Average_CompA Exceptional").display = display.hidden;;

}

else if ( nResult > 4 ) {

this.getField("Result Average_CompA Not demonstrating").display = display.hidden;

this.getField("Result Average_CompA Emerging").display = display.visible;

this.getField("Result Average_CompA Good").display = display.hidden;

this.getField("Result Average_CompA Strong").display = display.hidden;

this.getField("Result Average_CompA Exceptional").display = display.hidden;

}

else if ( nResult > 0 ) {

this.getField("Result Average_CompA Not demonstrating").display = display.visible;

this.getField("Result Average_CompA Emerging").display = display.hidden;

this.getField("Result Average_CompA Good").display = display.hidden;

this.getField("Result Average_CompA Strong").display = display.hidden;

this.getField("Result Average_CompA Exceptional").display = display.hidden;

}

else {

this.getField("Result Average_CompA Not demonstrating").display = display.hidden;

this.getField("Result Average_CompA Emerging").display = display.hidden;

this.getField("Result Average_CompA Good").display = display.hidden;

this.getField("Result Average_CompA Strong").display = display.hidden;

this.getField("Result Average_CompA Exceptional").display = display.hidden;

}

It works absolutely fine...however, I'd like it so it doesn't show any result unless an option from each of three radio button groups is chosen. Is this possible? (The above script looks at this field "Comp A total score" to get the score, which holds the total of "Comp A Group 1" "Comp A Group 2" "Comp A Group 2")

Any ideas??

Thanks

TOPICS
Acrobat SDK and JavaScript, Macintosh, Windows

Views

137

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 17, 2017 0