How to create a microflow for the Selecting the True or False Questions For the Quiz Question Panel Page?

0
  Where I have to select the correct answer for the question and that answer should be saved in database? Can someone please give me microflow so that it will be easy to understand.
asked
2 answers
4

Hi, Purva Ganesh Rathod

 

Steps to Create the Microflow

1. Define Entities and Attributes

  • Quiz:
    • Name: String
  • Question:
    • QuestionText: String
    • IsCorrect: Boolean
  • Answer:
    • UserAnswer: Boolean
    • Reference to Question
    • Reference to Quiz

2. Create the QuizQuestionPanelPage

  • Add a data view for the Quiz entity.
  • Inside the data view, add a list view or data grid for the Question entity associated with the quiz.
  • In each row of the list view, add two radio buttons or a dropdown for True and False to capture the user's answer.
  • Add a button to submit the answers, which will trigger the microflow.

3. Create the Microflow to Save the Answer

  • Microflow Name: SubmitAnswers

Microflow Steps:

  1. Create Microflow:

    • Open the Microflow editor.
    • Set the Quiz entity as the parameter to the microflow.
  2. Retrieve Questions:

    • Use a Retrieve action to get the list of Question entities associated with the Quiz.
  3. Loop through Questions:

    • Add a Loop action to iterate over each question.
    • Inside the loop, perform the following actions:
  4. Create Answer Object:

    • Use the Create Object action to create a new Answer entity.
  5. Set Answer Attributes:

    • Use a Change Object action to set the attributes of the Answer entity:
      • UserAnswer: This should be set to the value selected by the user (True/False).
      • Reference to the current Question.
      • Reference to the Quiz.
  6. Commit Answer:

    • Use the Commit action to save the Answer entity to the database.
  7. End of Loop:

    • Ensure the loop covers all questions.
  8. End Microflow:

    • End the microflow with a close page or a show message action to inform the user that the answers have been saved.
answered
0

Hi Purva,

 

just create two microflows with the input parameter of the question. In one microflow change the value to true, in the other to false, then commit, or commit in the Next button.

answered