Hi Everyone! I found a way to filter quizzes and flashcard games based on time, size, and category. These are the functions I put in the OnSelect of a "Start" button on the home page. This would then direct the user to the quiz page.
//Set Timer Value
If(
Dropdown1_3.Selected.Value = "30s.", Set(timerVal,Value(30000)),
Dropdown1_3.Selected.Value = "60s.", Set(timerVal,Value(60000)),
Dropdown1_3.Selected.Value = "90s.", Set(timerVal,Value(90000))
);
//Set Question Limit on Flashcard/Quiz
If(Dropdown1_1.Selected.Value="S (10 Questions)",Set(varQuestionCount, 10),1);
If(Dropdown1_1.Selected.Value="M (20 Questions)",Set(varQuestionCount, 20),1);
If(Dropdown1_1.Selected.Value="L (30 Questions)",Set(varQuestionCount, 30),1);
//Select Question/Answers & move to collection, then randomize answer selection
Set(varQuestion,PowerAppTest.Run(CourseDropdown.SelectedText.Value,1));
ClearCollect(
colAnswers,
{Answer: varQuestion.correct_answer,
Type: "Correct"});
Collect(
colAnswers,
{Answer: varQuestion.incorrect1,
Type: "Incorrect"});
Collect(
colAnswers,
{Answer: varQuestion.incorrect2,
Type: "Incorrect"});
Collect(
colAnswers,
{Answer: varQuestion.incorrect3,
Type: "Incorrect"});
ClearCollect(
colAnswers,
Shuffle(colAnswers)
);
//Reset the count of answered questions & the count of correct questions, clear table of answered questions
Set(varCount, 1);
Set(varCounter,0);
Set(varCorrect,0);
Clear(colQuestions);
//Navigate to Quiz or Flashcard Screen
If(Dropdown1_2.Selected.Value = "Quiz", Navigate(QuizScreen), Navigate(FlashcardScreen))