Creating a one round quiz in InfoPath - InfoPath Dev
in

InfoPath Dev

Creating a one round quiz in InfoPath

Last post 02-09-2017 07:55 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-08-2017 11:32 PM

    • plutoo
    • Not Ranked
    • Joined on 02-08-2017
    • Posts 2

    Creating a one round quiz in InfoPath

    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.

    • If Value(Option A) = Value (Correct Answer) then set textfield =”Correct”

    I hope this was not too confusing. I would greatly appreciate any help. Thank you so much!

    Best Regards

     

  • 02-09-2017 07:55 AM In reply to

    Re: Creating a one round quiz in InfoPath

    Any chance you can attach a copy of your form to a reply under the options tab? I'm wondering if this is a simple matter of needing a filter on your data when you look for the answer....
    Hilary Stoupa

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.