Can I add fields from two different tables on the same screen?

I’m building a quiz-based app. I have three data tables - Questions, Answers, Suggestions.

Questions has the quiz questions.
Answers has the answers to the questions - there are 2 to 3 multiple choice answers for each question.
Suggestions - once all answers are tallied, will give the user self-care suggestions based on which category of answers they choose the most.

I would like user to see one question and it’s set of answers at a time. User should choose the preferred answer and then see the next question and it’s set of answers.

In Layout, I can see the list of questions and I’ve figured out how to only see one question. But I can’t get the related answers to show up. This is where I need guidance.

How are they choosing an answer? If it’s multiple choice and you are using a choice component, then you can have a relation from questions to answers and source the choice component from the relation. If it’s just a listing of answers and they choose some other way, then you could use the same relation as the source of a collection to display the possible answers. If it’s something else, then you will need to explain how you want the answers displayed and how you want the user to choose an answer.

It is multiple choice. I don’t want it to be just a listing of answers. I was using Gemini to help me get to that point and it kept telling me to use a list component but it sounds like a choice component might get me a little closer. I’m not sure I know how to create a relation from questions to answers and source the choice component from the relation but I’ll keep trying. If you feel like explaining that part further, I would love it. Thanks for the help! I appreciate it!

Assuming you have a similar value in both tables, such as a Question ID in both tables, then it should be pretty easy to establish a relation linking each question in the Questions table to it’s relation answer options in the Answers table.

That relation can either be the source of a list collection or the source of a choice component. Which one is up to you. The choice component is easy because it will both show the options, and allow you to select one, which will write the result to a column in the Questions table.

1 Like