I have a simple app, where a question is posed and there are 2 buttons for Yes and No
My database collections are like this:
User
Question
Answer
Question and answer are linked, since many answers could be tied to one question but only one question for each answer.
I created a list to pose the question, then a Yes and No button underneath
Problem:
When I first test, it works intermittedly. Most of the time it’s not recognizing the ‘current question’ and recording that in the answers database, it just leaves that blank.
I cannot find where to ‘link’ the data for the current question so that it’s recorded in the answers record. Is there another way to do this?
Here is my list, which is a maximum of 1 since I only want one question at a time
I guess you have added the button on the simple list? That won’t work because you can’t access current item data when you add a new component on a simple list. So what you need to do is remove the simple list and add a custom list and then add the button into that custom list and you will able update with current question data!
Initially that solution worked, however when I signed in as a different user, or hit Yes or No multiple times it did not show up with the correct question, see below:
It is sporadic. It is working as expected now, however a few days ago if I answered the same question with the same user multiple times, or logged in as a different user, it would not link the Question. I’m not sure the reason for it not working as I don’t see a pattern I can hone in on. For now I"ll say it’s fixed.