How long will a custom state hold its values for/what events cause them to "renew"?

Can anyone tell me which actions or events will cause a custom state to “clear” it’s values…I’m pretty sure refreshing the page will.
My situation is that I want users to enter transaction details but to keep it easier for them, I need to do it across a few stages. So step 1 is to pick a list of contacts, step 2 is to select a product and there are a couple of extra steps. I somehow need to “hold” the list of contacts selected in Step 1 and then the list of products chosen in Step 2 so that they build up a transaction record which will be complete on, say step 4. I’m thinking a Custom State will be my friend here. I could be wrong, please say if I am. My main concern is that I’m presenting the steps to the User on PopUps (Tabs seemed quite tricky) and I wonder if the Custom State will lose its values when sequential PopUps are hidden and the next one opened.
Any advice would be very gratefully received.
Kind Regards

Hi there, @joefarrowsmith… my understanding (which Bubble’s documentation appears to confirm) is that only a page refresh (or an explicit workflow action, of course) will reset a custom state. Also, I just did a quick test that involved a popup and a couple of custom states, and it does not seem that opening and closing the popup has any effect on the previously set custom states.

Hope this helps.


1 Like

Magic . Thank you. And please forgive my inability to find the documentation - I promise I did search before asking but, well, Monday morning…
Thanks again.
Have a lovely rest of day.

1 Like