How to structure my data to match excel?

I am creating an app that helps users perform an audit.

An audit is a series of questions about up to 5 different items (Listings)

The questions can’t be hard coded as fields because I need to be able to add or remove questions from the front end.

You can see a screenshot of the excel spreadsheet that it is modeled after.

I would like to be able to display the audit so that the answers to each question for each listing are displayed in line…

I can’t figure out how to structure the database to make this work… OR how to use bubble’s display options for lists (I am aware of merge, group etc but can’t determine if one of them solves my problem)

My first attempt was to have a list of questions with Listings (a datatype) as a field in questions.

I toyed with grouping questions by ASIN and also with using the unique elements function but it wasn’t working.

Thanks!

Hi @ian11
I would structure it in the following way:
Table/thing1: Survey Question (each item represent one question in the audit)
Table/thing 2: Listing (each item represent one listing)
Table/thing 3: audit question id, listing id, response (so each audit object represents one “box”)

From the UI perspective I would do nested repeating groups. The outer repeating group has one column is type Survey Question, and the data source is a search for server question (no conditions),

Each row will have the question and a repeating group (inner)

The inner repeating group is one row… it has type Audit, and data source search for Audit where question is parent group question (or by index, etc…)…

Eldad

1 Like

Thanks, That’s a great solution. I will play around with it.

After experimenting this seems like it’s going to work! Thanks - It also gave me a new perspective on how to think about data structure.

Appreciate the help and the lesson alot!

1 Like