Hello,
I am a beginner in bubble.
I am stuck on a problem of foreign key registration in a database.
I have two tables: a questionnaire table and a question table.
As you can see, in the questionnaire table, I have the list of questions that will be used to filter my questions according to the questionnaire.
Unfortunately, instead of saving the index of my questions in my list, I save the index of my questionnaire.
I show you how I set up my workflow.
Thank you for your interest in my problem.
As you can see, below. I show you the content of the questionnaire table.
In the field “question_list”, I should have the index of the questions. But instead, I find the indexes of the questionnaires.
This is very odd… do you mind to share your editor so I can take a look?
Anyway, I saw that you are already saving the questionnaire as a data inside the question. So there is no need to add the question to a list inside the questionnaire.
If you want to see the list of questions of a specific questionnaire just do a “Search for” the questions where the questionnaire field is equal to the one you are looking for…
Hello,
Thanks for your help.
I’m still in free version so I can’t share my editor. However, I can send you the application.
For your proposal to filter on the questionnaire index in the question is a good idea. I will try it. It will allow me to make progress.
But I would have liked to know why it is not the index of the question that is recorded but the index of the questionnaire.
I think that the answer is certainly in the structure of my groups that I don’t know well.
Merci
Thanks to rpetribu who found my mistake
I take back his message.
<<Found the problem. Everything was correct. The problem was that, in your database, you selected to display your questions using it’s questionnaire’s uniq_id instead of use the question’s uniq_id.>>