Am I crazy? Custom state unable to get working, state on list of database fields

Hi All,

I am lost so hopefully somebody is willing to help me out here.

I have a list of fields that I want to show, attache a custom state to and use that same list in case a custom state is true in another process.

For some reason I am unable to figure out how to set a state on a list of fields and use the new list with states.

I know how to set a custom state on elements though.

What I want to accomplish…
Load a list of database fields and show only one (Done, by using GR and one column and row, fixed)
Use thumbs up and down to proceed to next field in the loaded list above (Done, using workflow on element)
Now I want to assign the thumbs up or down state to the respective field that is shown. And here I get lost. Tried everything…
If this succeed, I want to use the list with thumb up and down fields in another process.

Probably something simple. If only somebody could have a 5 minute look with me and point me in the right direction…

I sent you a PM. Happy to take a look at it. :slight_smile:

1 Like

I have it all working now. It has taken me hours and hours and hours. And for others to learn I will put down some things that were not yet clear to me in the beginning, which might help you as well.

Custom states:
A custom state is a place (state) where you can store data for a moment. See it like a database but in this case it is stored in the memory of the users browser. This is handy to perform all kind of workflows and data manipulation without any traffic towards the database. This saves time and computing power, plus it gives you flexibility as there is no need to have lots and lots of fields in your database.

You can have custom states on any element in Bubble. If you are on a different page then were you placed the custom state, you do not have access to it. So make sure you select an element that is both logic and convenient. Some use a repeating element like a header for instance. Or they use the index page.

What you save in a custom state can be anything. Make sure, when you setup a new custom state that it is of the type you are looking for. So if it has to do with users, use the user as type of the custom state, and so on. If what you save in a custom state can become a list, make sure you tick the box to make it a list.

And for the rest, as soon as you have a custom state, it is simply a bucket where you can put in values. This can be done using workflows with the option element action --> set state. There you select the element where the custom state is saved, tell Bubble which custom state you want to change and lastly let bubble know with what it should change that custom state. If you want to add elements or remove them, you have the :plus item and :minus item at your disposal. With plus you can add items. with minus you obviously can remove that item.

Eventually you can use your custom state to populate the database with a value. In that case you change a thing rather than setting a state.

In my case I have made a repeating group and the values in that repeating group came from the datase. I searched for value [x] and the repeating group was set to 1 row and 2 columns in my case. As I had 10 values, I had 5 pages of 2 values (2 columns whith in each a cell value (which is one the 10 values)). In that cell value I also placed the thumbs up and down value. Next I added workflow rules to both thumbs up and down icons. When pressing the thumbs up icon, I would simply go to element action --> set state, selected the element where I placed that custom state, I selected the custom state I wanted to populate and I populated it using the name of the repeating group, list of values, plus item, current cell value.

I hope this information is helpful to you. If you have any questions let me know and I will try to help out.

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