This is achievable, the logic depends on how you structure your database.
The simplest setup which comes to my mind is the following.
Let’s assume you have fixed number of answer options (3) for each question.
Then, you’ll have the collections:
- Questions, with Question Text, Option 1, Option 2, Option 3;
- Answers: relation to Questions (M:1), relation to Users (M:1), and 3 boolean properties: option1, option2, option3.
So each record in Answer can belong only to 1 User and 1 Question.
Let’s move to the screens.
You need to create a “Questions Lists” screen, with a list of all questions. Add two “Answers” button to the list, to go to the next screen.
Then, you have a “Question Details”, where you display a question. You will have “Current Question” available in this screen. On the Questions screen, you display Current Question → Text.
Let’s add some logic.
The first “Answer” button will be conditionally visible: only there is NO answers for this question by this user yet. So it’ll be visible ONLY if Current Question → Answers → Count, filtered by Answer → User → Email equals to Logged-in User → Email, equals to 0.
In other words, you’re counting the quantity of records in Answers, where the record should belong to current Question AND to Logged-in User, and if there are 0 such records - you display the button.
The second “Answer” button in fact will be a single-item list. You convert it to a List of Answers, and then add a filter: Answer->Question should be equal to current Question, and Answer → User should be equal to Logged-in User. You may need to use filters by some fields for this.
In other words, this button will appear only if there IS at least one answer for this question by this user. The thing is that in normal circumstances there should not be more than 1 answer per question, as user will not have a possibility to add a 2nd answer.
Hope you’re still with me
Both of these buttons should lead to “Question Details” screen. But to finish the logic, you need to have “Current Answer” available there.
So, for the 1st Answer button (when there are no answers yet), you add an action “Create Answer”, and set a relation to Current Question & Logged-in User. This means that before going to question details screen, you’ll create a new answer.
And then, on “question details” screen, you put 3 toggles, and set up them in a way that they modify option1, 2, 3 for Current Answer, and add an additional actions to “uncheck” the other options.
Two important notes:
- I didn’t test this in a builder and created all this instruction “by memory”. So the probability of some typos is not low But in general logic should be correct.
- This solution is just one of several possible, it’s not the best/easiest/most reliable/robust/etc. There could be other ones - some of them more flexible (and more complicated), others could be simpler.
But I hope this will give you some food for thought at least