Bubble.io Option Sets: What They Are and Why You Should Use Them Everywhere
Option Sets eliminate dozens of unnecessary database queries per page load. Status fields, roles, categories, priorities — everything that should be an Option Set, why it matters for performance, and the display_label attribute that changes how you use them.
Zero Database Queries for Fixed-Value Data
An Option Set is a predefined list of values defined at the app level — not in the database. Status fields (Active, Inactive, Pending), role names (Admin, Member, Viewer), priority levels (Low, Medium, High) — all of these should be Option Sets. Using them correctly eliminates dozens of unnecessary database queries per page load and makes your app significantly faster.
When to Use Each
| Approach | DB Queries | Validation | Best For |
|---|---|---|---|
| Option Set | 0 — values in app definition | Yes — only defined values allowed | Status fields, roles, categories, fixed enumerations |
| Text field | 0 — stored directly | No — typos possible | One-off values with no enumeration needed |
| Data type record | 1+ per page render | No — users can create any value | User-created categories, dynamic taxonomies |
Step-by-Step
Data → Option Sets → Add option set. Name it in singular form (e.g. ‘Subscription_Status’). Add your options: Trialing, Active, Past_Due, Cancelled. Each option can have additional attributes beyond its name.
Active
: display_label=’Active’, color=’#2e7d32′
Past_Due
: display_label=’Payment Required’, color=’#c62828′
// Read in UI: workspace’s subscription_status’s display_label
On any data type, add a field. Set its type to your Option Set. That field can now only hold one of your predefined values. No typos. No inconsistent capitalisation.
Search for Workspaces [
subscription_status = Subscription_Status.Active
]
// Multiple values
Search for Workspaces [
subscription_status is in [Active, Trialing]
]
A Definitive List
Status fields
Active/Inactive, Open/Closed, Draft/Published/Archived, Pending/Approved/Rejected. Any field tracking a record’s state is a natural Option Set.
Role fields
Owner, Admin, Member, Viewer. Using text allows typos. Option Sets enforce valid values and enable clean comparison expressions.
Category and type fields
Project type, ticket category, content type. If the list is fixed by the product (not user-configurable), it belongs in an Option Set.
Priority levels
Low, Medium, High, Critical. Urgency scales, importance ratings, severity classifications. All fixed enumerations.
Days of the week
Monday through Sunday for availability or scheduling. An Option Set with 7 options beats a list of text values every time.
Any field with fixed choices
If a user picks from a fixed list and cannot create new options, it is an Option Set. If a user creates their own values, it is a data type.
Add a display_label Attribute to Every Option Set
The internal name of an option (Past_Due) is often different from how you display it to users (Payment Required). Add a display_label text attribute to every Option Set. Show the display_label in UI. Use the internal name for searches and conditions. This way you can change the display without affecting any search logic.
Build Your Bubble.io App With Expert Help
Pakistan’s leading Bubble.io development team. Multi-tenant SaaS architecture, Stripe billing, and full product builds done right from day one.
