Expand my Community achievements bar.

SOLVED

Text field value based on numeric value of a number field

Avatar

Former Community Member

I am trying to make a fillable PDF form for a Performance assessment.  I have three radio buttons that put a value in a total box.  For example, Not good = 15, Good = 30, Excellent = 45.  So depending on which radio button you select, the value of it will be 15, 30, or 45.  I have 6 different categories so the score can be anywhere from 100 - 300.  Based on these scores, there ranking is determined, so what I am trying to do is make a text box equal their ranking based on their total score.  This is what I tried with no success.

SalesPA.SalesPA.OverallScore::calculate - JavaScript, client)

if TotalPoints > 234

this = "Exceeding Expectations";

if TotalPoints > 179

this = "Meeting Expectations";

if TotalPoints > 99

this = "Not Meeting Expectations";

}

1 Accepted Solution

Avatar

Correct answer by
Level 7

Your JavaScript syntax was incorrect. Use the validation syntax tool in the future to avoid this. Here is a corrected version.

if(TotalPoints > 234)

{

this.rawValue = "Exceeding Expectations";

}

if(TotalPoints > 179)

{

this.rawValue= "Meeting Expectations";

}

if(TotalPoints > 99)

{

this.rawValue= "Not Meeting Expectations";

}

View solution in original post

4 Replies

Avatar

Correct answer by
Level 7

Your JavaScript syntax was incorrect. Use the validation syntax tool in the future to avoid this. Here is a corrected version.

if(TotalPoints > 234)

{

this.rawValue = "Exceeding Expectations";

}

if(TotalPoints > 179)

{

this.rawValue= "Meeting Expectations";

}

if(TotalPoints > 99)

{

this.rawValue= "Not Meeting Expectations";

}

Avatar

Former Community Member

jnicholas,

Thank you for your response.  I have made the change but my text box is still blank.  I can't seem at attach a screen shot of my screen.  Should this be under "Calculate" or should it be something else?

Avatar

Former Community Member

Hi AceBK,

Is it possible for you to mail the form @ kvdvijaykumar@gmail.com so that I can take a look?

Thanks,

VJ

Avatar

Former Community Member

I have played around with it and the only think I was missing was the ".rawValue" on the end of my field names.  Once I added that, it worked.