Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ConfiForms Calculating Score

Michael Taylor
Contributor
March 25, 2026

Trying to put together a quiz that will auto-grade after submission on Confluence Data Center v 8.5.23.

I have a question field and an answer field that checks that entry and outputs a 1 if the answer is correct. I thought it should be easy to add those fields together, but it does not add them correctly. Instead of 3 is they answer all 3 correctly, I get 5; or 4 or 10 if they get 2 correct answers.

If I ever get the raw score correctly, I will need to create a field that takes that total; divide by the total questions answered (which I was just going to go with a calculated field with number of questions as a constant) then convert into a %

<ac:structured-macro ac:macro-id="0fd4b447-10ce-47c5-9086-663d4d83a1c5" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">Questions</ac:parameter>
<ac:parameter ac:name="registrationFormTitle">Questions</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="db8caa59-162c-44ea-995b-dc49f20bbb69" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">name</ac:parameter>
<ac:parameter ac:name="fieldLabel">Name</ac:parameter>
<ac:parameter ac:name="values">[302877016|interndata|costcenter|false|false|]</ac:parameter>
<ac:parameter ac:name="type">user</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="fcdcf5de-6721-462d-91ab-5b6c8de6c804" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">department</ac:parameter>
<ac:parameter ac:name="fieldLabel">Department Name</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="8ff68a9d-aeb6-4e9d-b14a-1d6c987e6395" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Q1</ac:parameter>
<ac:parameter ac:name="fieldLabel">What is 6+6?</ac:parameter>
<ac:parameter ac:name="values">false[1=5|2=8|3=12|4=15|]</ac:parameter>
<ac:parameter ac:name="type">radio_group</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="93d76910-9352-498a-9718-3f5d1e8a15ec" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Q1Qcore</ac:parameter>
<ac:parameter ac:name="fieldLabel">Score for Q1</ac:parameter>
<ac:parameter ac:name="extras">IF([entry.Q1]=3,1,0)</ac:parameter>
<ac:parameter ac:name="type">calc</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="f22a7b25-fa89-462f-95df-37fefe3d5220" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Q2</ac:parameter>
<ac:parameter ac:name="fieldLabel">What is 6 x 6</ac:parameter>
<ac:parameter ac:name="values">false[1=12|2=26|3=36|4=48|]</ac:parameter>
<ac:parameter ac:name="type">radio_group</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="9b699584-80d0-40f4-8fa0-cb9bfd39fbaa" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Q2Qcore</ac:parameter>
<ac:parameter ac:name="fieldLabel">Score for Q2</ac:parameter>
<ac:parameter ac:name="extras">IF([entry.Q2]=3,1,0)</ac:parameter>
<ac:parameter ac:name="type">calc</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="69f8fcb9-5019-4071-abbf-bf3309f6706d" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Q3</ac:parameter>
<ac:parameter ac:name="fieldLabel">What is 6 / 6?</ac:parameter>
<ac:parameter ac:name="values">false[1=0|2=12|3=1|4=36|]</ac:parameter>
<ac:parameter ac:name="type">radio_group</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="7d4d7cd3-bfea-4c48-8b4e-b596b279edb0" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Q3Qcore</ac:parameter>
<ac:parameter ac:name="fieldLabel">Score for Q3</ac:parameter>
<ac:parameter ac:name="extras">IF([entry.Q3]=3,1,0)</ac:parameter>
<ac:parameter ac:name="type">calc</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="e500aaaa-69ab-413c-b133-e0f4d692ce1e" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">rawScore</ac:parameter>
<ac:parameter ac:name="fieldLabel">Raw Score</ac:parameter>
<ac:parameter ac:name="extras">Q1Qcore+Q2Qcore+Q3Qcore</ac:parameter>
<ac:parameter ac:name="type">calc</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>

2 answers

1 accepted

2 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
March 25, 2026

Hi @Michael Taylor 

You can just have a raw score (rawScore field) calculation done directly, with something like this

IF(ZEROIFEMPTY("[entry.Q1]")=3,1,0) + IF(ZEROIFEMPTY("[entry.Q2]")=3,1,0) + IF(ZEROIFEMPTY("[entry.Q3]")=3,1,0)

(changing the field type to "formula", so it works for updates as well - as "calculated" field type calculates only once on record create) 

0 votes
Michael Taylor
Contributor
March 25, 2026

That worked, thank you. 
I have a workable Grade formula field as well.

FORMATNUMBER(([entry.rawScore]/ 3) * 100, "##")

Was wondering if I could calculate the /3 into a variable that takes into consideration the number of questions asked instead of a constant.

Alex Medved _ConfiForms_
Community Champion
March 26, 2026

I dont think there is a method to get that count, sorry

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events