Hello everyone,
I am a newbie to sharepoint/infopath. Using the search function didn't help unfortunately. I have the following
problem. What I am basically trying to do is create a multiple choice, one
round “quiz” through InfoPath and SharePoint. I have four option buttons, each
with a different anwser option, and a submit button.
What I have accomplished so far is the following:
The Question is retrieved from a SP list (Column
“Question”)
The content for each Option (Columns “Option A”,
“Option B”, “Option C”, “Option D”) in the buttons is retrieved from the same
SP list where the question came from
There is another column with the correct answer
(not displayed in the form), where the SP admin entering the question and
answers enters the exact same answer as the correct Option
Whenever a user clicks on an option, a text
field says “your current choice is A/B/C/D”
The user then has to hit a submit button
The answers are posted to a separate SP list
once the form is submitted
The correct answer is displayed once the user
hits the submit button.
So far so good. However, what I can’t do is actually
generate a message “your answer was correct/false”. What I tried was the
following:
Created a text field where “Correct/false” should be displayed
Once the user hits the submit button, there is a
rule to check if the chosen answer (Option A etc.) matches the correct answer
(which was submitted by the admin in the SP list), and when that is the case,
it should display “correct” in the text field.
However, this doesn’t work: I think (not sure
though) InfoPath does not look at the value of the field, but at the actual
field.
To illustrate:
Option A: Car
Correct Answer (entered in a separate column, not displayed in the form (but it is connected to the form as all other Options!)):
Car
Rule: If Chosen answer (Option A) = Correct Answer, then set
textfield = “correct”
But while the content (“Car”) is equal, they are
not the same fields à
So they don’t match
A solution would be maybe some kind of formula that extracts
the values of the SP field, but I havent found such formula.
I hope this was not too confusing. I would greatly
appreciate any help. Thank you so much!
Best Regards