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

If all check boxes Checkboxes

Guest
Dec 08, 2020 Dec 08, 2020

I need help! I'm creating a review checklist where the reviewer will check the following boxes - Yes, No, or N/A for each questions. I'm using the Check Box Style: "Check" for Yes, "Circle" for No, and "Star" for N/A. I'm looking for a fomula that will automatically mark a box complete if all check boxes is either a Yes or N/A to tell me that all items have been satisfied/complete. 

 

Thank you.

TOPICS
PDF forms
1.0K
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
Enthusiast ,
Dec 08, 2020 Dec 08, 2020

1. What box will be marked as complete?

2. Does they need to be checked only Yes and only N/A or it can be some Yes and some N/A mixed? what about No?

3. Are they placed in columns?

4. How many checkboxes you have?

5. Are they mutually exclusive or you can select all of them?

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
Guest
Dec 08, 2020 Dec 08, 2020

1. A separate text box located on the top of the page.

2. Only one checkbox can be selected for each question, either a yes or n/a answer will be considered satified. If a checkbox is marked "NO" on any of the questions, it will not be considered complete.

3. Yes 3 columns. 

Nancy5E0A_0-1607468868294.png

 

4. 46 checkboxes each, 138 total.

6. 1 checked answer for each question.

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 ,
Dec 08, 2020 Dec 08, 2020

What are the names of the checkboxes? Do they follow a consistent naming pattern? What are the export values?

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
Guest
Dec 08, 2020 Dec 08, 2020

The name for the first 3 checkboxes in the 1st row is "Check Box1", the second row is "Check Box2", the 3rd row is "Check Box3" and so on for the next questions.

 

The export values for the 1st row/1st column for Check Box1 is "1A" for Yes, "1B" for No, "1C" for N/A 

The second row export values is "2A" for Yes, "2B" for No, "2C" for N/A

It will follow that sequence till the 46th question.

Nancy5E0A_1-1607476246432.png

 

 

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 ,
Dec 08, 2020 Dec 08, 2020

As suggested by Asim123, there is some complexity to this issue.

The short answer is yes, and the way to do it is to create a calculation script that will test all the checkboxes each time one is clicked, and then make the appropriate mark. 

How this is done is in the details.  I would suggest you start by reading this:

https://www.pdfscripting.com/public/Checkboxes-and-Radio-Buttons.cfm

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 ,
Dec 09, 2020 Dec 09, 2020

Your checkbox names are good but you need to change export values like this:
give entire column of yes an export value of "Yes" and entire column of No export value of "No"
and entire column of N/A export value of "N/A", your rows should look like this.
first row: Check Box1 with export value "Yes", Check Box1 with export value "No", Check Box1 with export value "N/A"
second row: Check Box2 with export value "Yes", Check Box2 with export value "No", Check Box2 with export value "N/A"...etc
Then use this code as "Custom calculation script" in text field where you want to display "Complete":

 

var total = "";
for (var i=1; i<=46; i++) {
if (this.getField("Check Box"+i).valueAsString == "Yes" || this.getField("Check Box"+i).valueAsString == "N/A") total++;
}
if(total == 46){
event.value = "Complete";}
else event.value = "";

 

This will show "Complete" in text field if all 46 checkboxes are checked with either "Yes" or "N/A" and it will be blank if even one of them is checked "No".

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
Guest
Dec 09, 2020 Dec 09, 2020
LATEST

It worked! Thank you so much!

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