# Creating new groupings of data?

**URL:** <https://forum.bubble.io/t/creating-new-groupings-of-data/77672>\
**Category:** Need help\
**Created:** [January 30, 2020, 1:25am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672 "2020-01-30T01:25:47Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![edew](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/edew/32/53643_2.png) [@edew](https://forum.bubble.io/u/edew)\
**Post date:** [January 30, 2020, 1:25am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/1 "2020-01-30T01:25:48Z")

</div>

Hi, I want to have a way to create a new set of data fields. The user presses the “+” button and a new set of input cells pop up. I guess I use the Group to store the elements of the data fields.

In my example, I have a group containing 4 fields (all text type): carModel, carYear, carLicense, and carColor. The user will enter data into the fields, as in the illustration below. Then, the user will want to press the “+” button to create a new set of fields to enter data about another car. **How do I enable this in the workflow for the “+” button?**

Illustration:

 ![dynamicFieldCreation](https://us1.discourse-cdn.com/bubble/original/3X/8/3/8330e487d01e4b790c6846836e422b8490a53e1a.png)

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 30, 2020, 1:29am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/2 "2020-01-30T01:29:09Z")

</div>

You need to use Repeating group and create a new item when they press add +

---

<div class="post-metadata">

**Author:** ![edew](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/edew/32/53643_2.png) [@edew](https://forum.bubble.io/u/edew)\
**Post date:** [January 30, 2020, 1:30am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/3 "2020-01-30T01:30:30Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![edew](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/edew/32/53643_2.png) [@edew](https://forum.bubble.io/u/edew)\
**Post date:** [January 30, 2020, 1:43am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/4 "2020-01-30T01:43:49Z")

</div>

The repeating group element doesn’t seem to be the right thing. I created a 2x2 (2 rows, 2 column) repeating group element, but it seems to require that all 4 cells in this matrix are of the same data type. Also, it doesn’t appear that I can tap in any of the cells to add text. I can install an input element into the cell, but I can’t uniquely identify each element. When I drop an input element into the top left corner, and name it carModel, all other cells get the same name.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 30, 2020, 1:47am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/5 "2020-01-30T01:47:59Z")

</div>

Right. You need to create a “thing” for that, that can be linked to other thing.  
I don’t know what is the usecase, but according to your screenshot  
Create a “thing” (I will call it “car\_list”)  
In this app, you will have a field that will be of Type thing that point to: Model DB, another field maybe of type “Year” that point this this DB if you have it, and maybe a final field that will point to Color DB if you have it. Same thing can be for the Plate.

Your RG will be set to car\_list. And you will be able to use car list’s model field to complete your first cell.

I think that maybe you should explain how your current DB is set so we can help you. Where the model come from? Is this a DB that you have? A dropdown list will be used?..

---

<div class="post-metadata">

**Author:** ![edew](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/edew/32/53643_2.png) [@edew](https://forum.bubble.io/u/edew)\
**Post date:** [January 30, 2020, 2:00am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/6 "2020-01-30T02:00:19Z")

</div>

The use case is the user is walking around and sees a car. He types “Camry” into the carModel field. Then types “2015” into the carYear field. And then types “7MHG433” into the carLicense field. And finally types “Metallic blue” into the carColor field.

He sees another car, hits the “+” button, types “Fiesta” in the carModel field. Types “2019” in the carYear field. Types “9LYM828” in the carLicense field. Types “Red” in the carColor field.

He then sees yet another car, hits the “+” button again, another new group of empty fields pop up and he types “Sentra” in the carModel field. Then types “2018” in the carYear field. Then types “8DHG845” in the carLicense field and finally types “white” in the carColor field. And so on.

There is no database to extract the car model names, years, license plate numbers, or colors from. All data are entered by hand by the user. That data will be stored in some database in the backend.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 30, 2020, 2:02am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/7 "2020-01-30T02:02:21Z")

</div>

So in this case, All you need is  
Car\_list DB  
With 4 text field: model, year, plate and color  
When user click +, you create a new item  
There’s different way where you can also use state and list of instead (like list of text). But it may be easier to create a DB. Also, if your user come back, you can search the last data from this user and show it again.

---

<div class="post-metadata">

**Author:** ![edew](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/edew/32/53643_2.png) [@edew](https://forum.bubble.io/u/edew)\
**Post date:** [January 30, 2020, 2:48am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/8 "2020-01-30T02:48:46Z")

</div>

So I DON’T use the repeating group element, then, right?

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 30, 2020, 2:50am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/9 "2020-01-30T02:50:08Z")

</div>

Yes. You need to use a RG for this kind of stuff.  
Or if you plan that user will not add more than 2, you can duplicate the first group and just hide the second one until user press +. But for “dynamic” number and unlimited number of item, you will need to use a RG.

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [January 30, 2020, 3:00am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/10 "2020-01-30T03:00:48Z")

</div>

@edew you need to watch someone doing this. Here, I demonstrate exactly what you’re trying to do. This is core Bubble stuff that is easy to master once you see it explained:

> [@Creating List Input Table and sending data as array](http://forum.bubble.io/t/creating-list-input-table-and-sending-data-as-array/75688/5):
>
> You’re trying to do this: (You don’t actually want to create a repeating group where every item is an editable thing. You really just want to have an input thing and show the results. While you CAN do that, it’s just a silly interface. Instead, what you do is have an EDIT icon in your RG [rather than a trashcan] and, when that’s clicked, toss that item into the input/editor thing. I may or may not show that exact application in the above video, but you’ll get the idea.)

---

<div class="post-metadata">

**Author:** ![edew](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/edew/32/53643_2.png) [@edew](https://forum.bubble.io/u/edew)\
**Post date:** [January 30, 2020, 3:01am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/11 "2020-01-30T03:01:15Z")

</div>

I think I see how you’re envisioning how it’s used:

Create four input fields, the carModel field, the carYear field, the carLicense field and the carColor field. They’re the input fields. User types the input, and that gets sent to the carList database. That database’s data are then presented in the RG. So the four input fields are fixed (and doesn’t grow). The “+” button just takes what’s entered into those 4 fields and puts them into the database, and to present them in the RG.

Does that sound right?

What if the user wants to edit a field? Say, for the 2015 Camry, he mistakenly entered the license plate and wants to edit it. Does he tap in the RG for that section and get to edit it? Or, say he didn’t know the year make of the car, so he left it blank. Then, he gets back and enters it some time later.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 30, 2020, 3:02am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/12 "2020-01-30T03:02:59Z")

</div>

This is one way.

But you can also create empty item in car\_list before user start to fill information and user can populate it in RG. You can also use autobinding, so any change (or edit) are automatically saved

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [April 9, 2020, 1:25am UTC](https://forum.bubble.io/t/creating-new-groupings-of-data/77672/13 "2020-04-09T01:25:51Z")

</div>

Closed on April 9, 2020, 1:25am UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
