Skip to main content
Participant
November 2, 2023
Question

Formulas to take answers from one multiple-choice grid to another in Adobe Forms

  • November 2, 2023
  • 1 reply
  • 499 views

Hi,

I need to create a form that begins as one multiple choice grid with 4 columns of possible answers A to D (I am ok with this part).

 

Then I need to calculate the total number of answers in each column (not the values of those answers) and have those show up at the bottom of each column.

Then I need each answer from the first grid, transferred to a second grid.

E.g on the first grid, answer selected is 1C. So on the second grid, row 1, column C, correlates with a value of 2. So I need this box selected or checked in the second grid.

 

Then, the values from each column in the second grid need subtotals, and an overall total.

Please help!

Thank you so much.

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
November 3, 2023

Unfortunately, adding colums of mutually exclusive radio buttons is not straight forward. 

I'll assume that the export values of the radio button is the same as the choices you've listed "A" - "D"

The radio button groups will need to be named in a way that can be automated, such as "Answer.Row1", "Answer.Row2". 

 

The custom calculation script for the total field on the first column must check for "A" values

 

var nSum = 0;

this.getField("Answer").getArray().forEach(function(a){if(a.value == "A") nSum++;);

event.value = nSum;

 

 

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