I ran into a problem with custom states in repeating group. The thing is I am making a quiz app, each question has 4 options and only one is right. Only one question is visible at a time, when you click “Next”, the next question shows. I have one repeating group for questions, which only shows one cell, in that repeating group I have another repeating group for answers. I set custom states for the answers (they are buttons) for them to change appearance when the button is clicked and the answer is right/wrong. The problem is that after user clicks “Next” button to see another question, the states of the answers remain the same (one button’s state “clicked” is yes) and I don’t know how to change it to no, so the appearance of the answers is the same as at the beginning. The “Next” button is in repeating group for questions.
Thanks for every help.
I have a quiz that’s very similar to this in my app…
What I do is when the person click in an option, it set states of “Answer state → current cell’s text”, and in each option I have a formating condition to:
WHEN "This cell’s text is Answer state and it is “Quiz answer” → all green…
WHEN "This cell’s text is Answer state but This cell’s text is not “Quiz answer” → all red…
WHEN"This cell’s text is not Answer state, but This cell’s text is Quiz answer → Show green with gray (So the person with wrong answer can see the right answer)
WHEN "This cell’s text is not Answer state and This cell’s answer is not Quiz answer → all gray…
when the person click “next”, it cleans the ‘State Answer’, and it resets the whole quiz
Remember to make this “State Answer” in an element outside the repeating group cell, because an outsider group can’t reach to states inside repeating groups (because they don’t know which cell you want to)
Thanks so much. It helped and now it is working perfectly.
This topic was automatically closed after 69 days. New replies are no longer allowed.