Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Assigning "NO VALUE" to a "RADIO BUTTON CHOICE"

New Here ,
Mar 22, 2022 Mar 22, 2022

Thank you for all the insight and help this community has provided... and continues to provide.

 

QUESTION: What must be entered into the "Radio Button Choice" for a radio button to be equivilant to "No Value" as opposed to it being equivilant to "0"?

 

INTENT: Provide an average score for only "applicable" categories.

 

EXECUTION: Create a form which allows for the user to chose one of 4 buttons which vary in score (0,1,2,3, NA) for each category. 

 

An average of each score will then be displayed. 

 

Since some categories are "Not Applicable" they need to have "No Value." 

 

If the "Not Applicable" categories have a value of "0," the final average off all the scores will be improperly skewed

 

EXAMPLE:

 

For each activity in which you participated, please provide a rating.  0 = Horrible, 1= Needs Improvement, 2 = Pretty Good,  3 = Awesome, NA = Not applicable, I didn't do this activity

 

a. Swimming:  0 - 1 - 2 - 3 - NA

b. Painting:  0 -1 - 2- 3 - NA

c. Camping: 0 -1 - 2- 3 - NA

d. Cooking: 0 -1 - 2- 3 - NA

 

If the score comes back as follows, 3 three "3"s and an "NA," with "NA" being equal to "No Value,"

a. Swimming:  0 - 1 - 2 - 3 - NA

b. Painting:  0 -1 - 2- 3 - NA

c. Camping: 0 -1 - 2- 3 - NA

d. Cooking: 0 -1 - 2- 3 - NA

 

The final aveage score will be "3"

However, if the "NA" value is "0," the final aveage score will be "2.25"

"2.25" is obviously not an accurate reflection of the final average "Awesome" grade which should be recorded.

 

Thank you in advance for any solution and support.

Radio Button Choice.jpg

TOPICS
General troubleshooting , How to , PDF forms
562
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 22, 2022 Mar 22, 2022

I've posted a function that allows you to calculate an average of fields, while ignoring zero values and/or empty (or non-numeric) ones. Search the forum for "calcAverage" and you should be able to find it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 22, 2022 Mar 22, 2022

Thank you for the response.  

 

I was able to find your previous post (https://community.adobe.com/t5/acrobat-discussions/formula-to-calculate-the-average-of-a-number-of-f...

 

However, I am not technogically savvy enough to know how impliment you recommendation.

 

I am hoping for a more simple fix, if it exists i.e., something which can be written in to "Radio Button Choice" box.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 22, 2022 Mar 22, 2022

There's no other way to do it beside using a script.

The script I provided is all you need. Just copy and paste the code, adjusting the names of the fields in the call to the function, and specifying whether to ignore zero values ("false" in your case) and empty values ("true").

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 22, 2022 Mar 22, 2022

Thank you for letting me know. 

When you state "Just copy and past the code" - where exactly must I paste the code?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 22, 2022 Mar 22, 2022
LATEST

If you only need it for one field then you can place the entire code under that field's Calculation event.

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