Creating a survey assessment table for each participant

Hi everyone - and happy New Year to the Bubble community. I need help on setting up my survey answers data table and associated workflow :wink:

Here’s what I’m trying to implement.
1/ participant select an industry from a list of industries dropdown and provide their email and their company’s name in text inputs
2/ when clicking the"Assess" button, I need a worfklow to create in the “Assessment” table a copy of the 40 questions from the “Survey” table filtered using the industry dropdown with for each question, the name of the company and the participant’s name and “No” as the default answer to the question.

The reste of my survey process (get users feedback on each of the 40 questions) is already mapped out and I will use a Make Changes to Thing workflow to log to “Yes” each time participants chooses to answer Yes to the question.

Any thoughts more than welcomed - kinda stuck here :disappointed:

1 Like

Hello @blebelle Welcome back to the community!

I am guessing on a filtering approach … but … it would be better to understand the dB structure of the object/s being constrained/filtered. In this case a surveyQuestion is my take.

Please share a screenshot of the field type for the industry or industries is within this dataType called for illustration purposes a “surveyQuestion”

1 Like

Hi @cmarchan - here’s a screenshot of the data types.

And another one of a question example

Is this what you were looking for?

1 Like

Two ways to go about this:

  1. The dropdown displaying texts which I guess are the names of the industries. Once a name has been entered it the industry should be searched for. Not adviseable at all because there could be duplicate names and other problems with this approach.
    2, The dropdown displays the names of the industries through a search industries each item: industryName

Number 2 would work. Also … you could run the search dynamically in an rg in a hidden popup that could feed this list to the dropdown so that it is ready when the user uses the dropdown. Or we could display it on the dropdown being visible. The reason for using a hidden rg is that it gives us access to conditionals there. But a simpler way would be to apply conditional searching to the dropdown itself.

Just a few ideas to hopefully spark a way to approach the functionality that you are looking to implement :smiley:

1 Like

Thank you @cmarchan - the displaying the industries in the dropdown works great. It’s now the second part - the creation of of the 40 questions (with No as default answer) for the specific industry in the Assessment table i’m trying to figure out :slight_smile:

1 Like

Add the questionEntries to the dB and … copy them each time. This will get you your new 40 new Qs for every new survey :wink:

1 Like

I don’t think you want a default no for each. It’s much easier to track if question was answered based on answer being null. Is there a reason you want to have a default no?

I think you don’t need to create the whole 40 answers at once. What I would do is this:

  1. You already display the 40 questions in a repeating group, right?
  2. You display yes/no radio buttons for each question and whenever one is clicked, you create a DiagAssessment entry in the database with the corresponding answer. But do this only when clicked on radio button, not before.

Simply, while the user is taking assessment, the answers table will populate for this user slowly. (i.e. you will have a bunch of answers in your database for a question for this user one step at a time.) Some will be yes, some will be no at the end. I think you can make the radiobutton yes/no mandatory as well, so a user can’t proceed without answering.


What would your opinion be on:

40-ready questions. quick navigation back and forth
one-at-a-time-to-be-created questions. quirky/slow navigation back and forth

I have been there before with various Bubble apps of this nature. Pre-created Qs win every time :smiley:

I dont have much experience how bubble can handle the ideal scenarios (how fast etc). So I dont know. But logically, a question will be answered by a user. So this answer should technically live by itself. If a question is not viewed, why should it have an answer in the db already. But again, Bubble might be faster in one way or the other, I will learn over time I guess :slight_smile:

1 Like

Each question may have an answer text field and a survey field.

There are other ways to approach this of course :smiley:

Hello and thank you @cmarchan, @hergin & @code-escapee for chiming in.
The structure of the survey is 40 questions grouped in 2 sub-themes within 5 main-themes in total. Hence 4 questions per sub-themes. Each block of 4 questions is (currently) displayed in a separate RG using themes & subthemes as filters to get the following visual result:

@code-escapee - I need to have all 40 questions with No as default so once the survey is complete, I can easily filter out questions where as No is till the answer.

@hergin - each question Toggle button has an associated workflow that will change the value of the question’s answer in the Assessment table.

Displaying questions is fine - however I still need to first create the 40 Assessment entries that will, based on user responses, be updated to a Yes or No. This is where I’m stuck :disappointed:

Many thanks for any ideas

My suggestion would still be create the response only when it is checked (or toggled to yes). Below is how the structure in my head works:

These are the data types that make it possible. You don’t have to duplicate the whole question, you can just create a given answer data type and modify the checkbox initial state and the feedback value by searching.

Question data type:

Given answer data type:

The checkbox is behaving differently if it exists a given answer for the current question or not.

if it exists, update its answer,

if it doesn’t, create a new answer with yes.

So, technically, you don’t need to store nos in the db until you really need it. I toggled the given answer to no when the answer unchecked. For example you can remove the answer from the DB as an alternative, so there will always be yeses in the DB.

1 Like

@blebelle plus 1 on this

Thank you @hergin I’ve implemented your solutions and it works like a charm.
Many thanks everyone for your support. :sunglasses: