0 Replies Latest reply on Oct 17, 2017 1:15 PM by soulglowdeej

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

    soulglowdeej Level 1

      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