Trouble increasing and adding more than 1 row/item using customs states and RG

I believe I am on the proper track, but I am getting a small setback. Adding an item/row but it’s only adding/showing 1. It is supposed to add item/row, every press of the “material icon plus”. I already used “:plus item” as an operator, but as mentioned, it only adds 1. Nothing beyond that.

Can you show the workflow/action of how you are adding the item?

Ankur@ Nocodetalks
Looking for a Bubble Coach? Check out here

@ankur1 Thanks for replying. So I use set state as part of the workflow upon clicking the add button.

@janernestgo “plus item” does not allow you to add the duplicate items to the list.

Oh! I intend to create new fields, so that when I save these data eventually, they will be created separately in the database. In that case, how should the expression be written? @ankur1

@mikeloc Hi mike! was wondering if you have an idea how to approach this. Thank you and appreciate your suggestions.

Folks may disagree, but assuming I understand what you are trying to do, I would likely scrap the custom state idea and simply create a new thing in the appropriate data type when the plus icon is clicked. A repeating group below the icon would display the newly-created things, and you can make changes to the current cell’s thing when the fields are updated (and you can delete the current cell’s thing when the trash icon is clicked).


In that case, when the “enterprise contact persons” become a thing on their, I intend to attach them to their company/ enterprise, hence, I was trying to do the custom state approach. Now that these two, enterprise contact person and company/enterprise, will become separate things, they can still be attach later on to one another, right?

Sorry, I don’t think I followed that question, but in general, yes, two things can be attached to each other “later on” (whatever later on means to you).

Sorry about that. Initially, I wanted to create a thing called company, then the user has the option to create contact “enterprise contact persons”, using customs states that would show/add field boxes per contact person. As you recommend, instead of custom states, it may be better for them to be a thing, so I will have a thing/database named “enterprise contact persons”. I will need to attach them to their appropriate company (thing/database).

Ah, okay. Yeah, that should be easy enough to do… it just depends on how a user specifies in your app that a certain contact belongs to a certain company.

Thanks mike! So with this approach, the RG will only reflect / show on a per row basis, the contact persons that have already been created and stored in the database. These will be entered/created through permanent field boxes, that clear themselves, as the contact persons things are created and stored in the database. Right?

Sorry again, but I’m not sure I followed that question either. In general, the repeating group will show whatever you specify as its data source, and yes, as new things are created, their fields will be empty because values are not being entered into those fields when the thing is being created.

@mikeloc Thanks Mike! I thought there’s only 1 way of doing this and that’s through custom states. Thanks for showing that creating them as things are not bad at all.

1 Like

hello @mikeloc ! So I did try and follow your recommendations, and made it as a thing, instead of custom states. However, I realized that since the RG is calling the data that has already been stored, every time I add new things/contact persons, the RG will keep on showing currently stored things in the database when I am adding new enterprise contact persons (data)

Ah, that’s why I was careful to say in my last response that the repeating group will show whatever you specify as its data source. So, find a way to add a constraint to the data source to only show new things/contacts. Without knowing a lot more about your app, I can’t provide those kinds of details for you.

Got it mike! So the key now is for the RG to only show blank whenever the page is accessed.

@mikeloc I was thinking, since the 1st thing to be created are the child-data which is the contact person, before their parent-data which is their company. When a database is created for the contact person, can another database / thing (company), actually extract the things (contact person) from that separate database?

When the contact person (things) are extracted from their database, I intend the workflow to append them (contact persons), to the newly created database for company - this will create an outcome where the thing/company, actually now have the contact person, all in that same database. Then clean up the separate database (contact persons), and actually remove all things (contact person) there.

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