How to populate a data type (table) based on selections made in a radio button

Hello All,

I am in the middle of building a quiz.

The UI for a question in the quiz consists of the serial number, question and 3 answer options - call these Option 1, Option 2 and Option 3. The serial number and question are both texts while the answer options are radio buttons.

In the database, I have some data that corresponds to each question and option. For instance, the category of the question or the applicable feedback or response to the option selected by a user when responding to a question.

The end goal of the quiz is to present a result to the user. This result will contain information such as the category of the question, the response or feedback to the option selected and a status color e.g. red for wrong and green for right. My approach for accomplishing this is to send all the data I want to present to t he user to a data type/ table and then to present it via a repeating group.

Questions:

  1. What is the best way to associate a question on the UI to a category within the database? Should the question also be a field in the database for me to achieve this?

  2. How can I associate a radio button to data in the database, such that when an option is selected, the appropriate pre-documented feedback in the database is selected and posted to another data type/ table?

  3. What is the best way of indicating the status color on the report the user sees?

  4. Am I thinking about this the right way, or is the logic flawed?

Thanks in advance.

Make an option set called “Quiz Answers” or something with 1, 2, 3 as the options.

Make your radio buttons show these 3 options.

Make a data field for each question with the name being the question, and the type “Quiz Answers”.

Make a workflow for each question that is “When input value is changed - Radio Buttons A”.

When that workflow runs, the action should make changes to that question’s data to set the answer to the Radio Buttons A’s value.

Then on your result form, you’d have conditions that an icon turns green or whatever when “Question ______'s Quiz Answer is 1” or 2 or 3 or whatever the correct answer is.

Thanks @melbournemarsden. I will try this out and let you know what the outcome is