How can I add a value to a list of states?

Hi forum! I have a question. How can I add a value to a list of states? It seems like I can only add a text, but I want the values based on the groups a user of mine selected. (See screenshot below)

Custom States are of a particular data type - check to see if yours is set to type ‘Text’ and instead change it to the data type you need to populate it with.

Hi! Thanks a lot for your fast reaction. What do you exactly mean?

Regards,

He means that, just like all other data in Bubble, custom states have to have a defined type.

And, obviously, you can only set a value for a custom state that is the correct type.

So if your custom state is a list of texts, then you can only set a value which is a list of texts.

If it’s a list of something else, then the value has to be a list of those things.

1 Like

OK thanks!
This is my setup now, I added a datatype to the custom state. But still not adding it correctly. How should I do this?


It’s still a mismatch of types.

The value you set must be the same type as the custom state expects.

Currently it looks like your Custom State expects a list of noficatie_accounts

But you’re trying to set it to be a single Email_notificatie_gerbuiker

Which is not only the wrong type (presumably), but also not a list.

Even if it is the same type, it’s still not a list,

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