Submitting all listView data

Hello, the problem is about a questionaire (and submitting the results)

  1. I have a listView1 with select components
  2. Tabs control the the listView content, as the questions have to change (they come from different sources, I could do it from one long list of qustions taken from one query too, but thats the way to separate them by type)
  3. I want to submit all the answers to the retool database.
  4. At this moment when I want to submit listView data - it submits only, obviously, the questions from given tab. How to submit all the questions, answers from all tabs? Maybe a temporary state could help?

I can think of three possible solutions here:

1. Create a list view for each tab
What you could do is have a separate listView component for each possible tab that are all hidden by default. Then based on the given tab, change the hidden status to true for the listView tied to that tab.

2. Use a temporary state
Then every time they move from one tab to another, use the .setIn property to add each of the responses to the temporary state. (You can find more about this here: Store temporary data with Temporary State and localStorage | Retool Docs)

Then you can submit the content of that temporary state to your database.

3. Use the Wizard component
Instead of using tabs you could use the wizard component to dynamically guide users through the questionnaire based on their previous answers. Then between every screen, create a virtual step that submits the previous answer directly to your database or add it to the temporary state like in the previous steps. (More info on wizards here: Build a series of steps with branched paths using the Wizard component | Retool Docs)

1 Like

Thank you! I need to dinamically add 'steps/tabs/ names from db, so the wizard is not an option, as it do not allow that. I will try to create the temporary state and tabs. Thanks you!

1 Like