Expand my Community achievements bar.

Radio Button Group Avg with assigned text

Avatar

Level 1

Hi!

I have 4 groups of radio buttons (each containing 5 buttons with values of 1 through 5). I am averaging for a final score, I would like the final score to populate a "verbal result" field. For example if the average score is less than or equal to 1 it would be "unsatisfactory", if the score is greater than 1 or less than equal to 2 it would be "below" and so on through 5.

I have set up the avg but can't figure out how to get it to either auto populate a field or selection in a drop-down list.

Any ideas?

I am using LiveCycle Designer ES 8.2

Thanks!

1 Reply

Avatar

Level 10

Hi,

Javascript in the calculate event of the textfield should do it (or something similar):

var vAverage = .....; // your existing script

if (vAverage <= 1)

{

     this.rawValue = "unsatisfactory";

}

if (vAverage > 1 && vAverage <= 2)

{

     this.rawValue = "below average";

}

if (vAverage > 2 && vAverage <= 3)

{

     this.rawValue = "average";

}

...

If you have worked out the average in a different field (averageScore), then replace all of the "vAverage" above with "averageScore.rawValue".

Good luck,

N.