Forum Academy Marketplace Showcase Pricing Features

Way to make a categorical field type?

Is there a way to define a categorical field type? For example, the yes / no field type is a categorical field type that has only two possible states - namely the Boolean logical indicators. And in bubble, when the field type is yes/no, it will give you those options as dropdown values


Is it possible to pre-define other categorical fields? Like the value can only be ACCOUNT_ROLE_UNSPECIFIED, OWNER, CO_OWNER, MANAGER, or COMMUNITY_MANAGER in the case of setting an account role

Create a data field and name it “Permission” or “Account Role” (whatever tickles your fancy) in the built-in User database. Make sure to make the datafield of the type “Text” so that you can then reference it in a condition, for example “When current user’s Permission is Admin” - “This element isn’t visible” (see below). The second image shows an example of how you should set up your database and the first shows an example of how you can reference this, whether it be in a condition, privacy policy etc.


I appreciate that response :slight_smile: I knew this was possible but it’s far from ideal. The genius of having a Yes / No field is that, by bubble limiting you to the choices yes or no you can’t enter an impossible value such as YeS or nO or even maybe. If I manually track and assign these categories like you’ve suggested then I can and will accidentally type in admin or Admi instead of Admin and then my app wont work and I’ll be scratching my head for hours trying to figure out why.

I wonder if there’s a way to catalogue these categoricals in a plugin that I could then just pick from Bubble’s dropdown much how we do now with yes / no

So for example instead of having Yes / No show up here as default choices we could choose from ACCOUNT_ROLE_UNSPECIFIED , OWNER , CO_OWNER , MANAGER , or COMMUNITY_MANAGER

Oh ok I understand and agree that would be a great addition. Maybe create a new forum post under the “Idea” section for a feature request? What I tend to do is add notes on the “Permission” datafield listing the values I need. So for example I would have ‘Admin’, ‘Trainee’, ‘Staff’ etc all listed in the notes, enabling me to simply copy and paste them into conditions.

1 Like

Hmmm, that’s a pretty smart workaround! Thanks!

In the mean time here’s my feature request you suggested I post