Add item to custom state list without database

I have a repeating group that uses a custom state (named list_produits_state) as its data source. This state is a list of a data typeProduit Acte”. I would like the user to be able to add multiple items to this list. Afterward, the user can validate the entire set of items, and the list is sent to the database.

For performance reasons, I want these actions to be executed locally. Unfortunately, I’m unable to add an item to this list without creating it in advance in the database. Am I missing something, or is this a limitation of Bubble? Is it possible to add a ‘thing’ to a list locally, using a custom state, without interacting with the database?

I tried to create another state that use “Produit Actedata type as state type and using it with :plus item but did not work.

Thank you :slightly_smiling_face:

What I made :

What I want:

Since the list’s type is a data type from your database, you cannot add items to the list that are not of that data type. If what the user is adding are just individual text entries (e.g the name of a proposed produit acte), then your list should be of type text and show as initial values, the name field from your data type. You could then have a workflow to create a produit acte item from each entered text.

2 Likes

Makes totally sense, thank a lot @louisadekoya
As I don’t just need individual entries I need to reconsider this idea.

I’ve been wrestling with the same issue as OP. Could you give me an idea what that workflow using the text to create list entries in the desired data type would look like?

This post by @artemzheg is super helpful in understanding datatypes, text, and custom states in repeating groups:

2 Likes