> For the complete documentation index, see [llms.txt](https://docs.airdev.co/canvas/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airdev.co/canvas/2.0.0-1/using-the-template/reference/data-and-workflows/option-sets.md).

# Option sets

Bubble data option sets

A few option sets come included with the Canvas template:

1. Page
2. Role
3. Inclusive "yes/no"

## Permissions

The Page and Role option sets are used to set permissions on app pages.

Fields for those option sets are as follows:

Role:&#x20;

* Display (text) - this is the role name
* Pages (list of Pages): This is a list of Pages that this role can access.

By default, your app comes with two roles: `App Admin` and `Standard`.

Page:&#x20;

* Display (text) - this is the page name
* Private? (yes/no) - "yes" means the page is private
  * If a user accesses a Page that is marked as Private, they will be redirected to the index page unless they are logged in to a User whose Role contains the private Page.

The Canvas Starter Template comes with a number of pages. The two private pages are the `account` page, which can be accessed by Standard and App Admin users (but not logged out users), and the `admin` portal page, which can be accessed by by App Admin users.

### Adding a new role

To add a new role, create a new option in the option set for that role

* New option in Role option set (e.g. Account Admin or Superuser)
* Create new Page option(s) and mark them as private if necessary
* Add Page(s) to new Role
* Assign the Roles to Users, usually through one of these methods:&#x20;
  * Assign the new Role to users manually in the Bubble Editor's Data tab
  * Build the logic to let App Admins sign those Users up from the admin page
  * Build the logic to assign the new Role to the Users when they're signed up

![Creating a new Page option (in the Pages option set)](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-M4EyvDdv7Pupli00uhk%2F-M4F2P7Ju0V7MiMdJp3l%2Fcompanyadmin.PNG?alt=media\&token=0200d4b0-b715-4692-96b8-afbd3f8305d1)

![Mark this page private if not all users are allowed access it](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-M4EyvDdv7Pupli00uhk%2F-M4F2Re9bdE3k1QMLg0q%2Fprivate-ca.PNG?alt=media\&token=00022924-cc42-4629-8dbc-0e49c06d36fe)

![Add the new Page to the new Role](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-M4EyvDdv7Pupli00uhk%2F-M4F2TV1i5cTRR-C1Enu%2Fca-role.PNG?alt=media\&token=bc3a6df1-73c0-4075-ae67-7cf7b2b20121)

If your App Admin users will also be accessing this Page, be sure to add the Page to the `App admin` Role.

## Inclusive "yes/no"

This is an option set that works similar to the Bubble "yes/no" data type, but adds a 3rd option that returns true for both yes and no. In short, it works as follows:

* *no* will return results where the field is "no"&#x20;
* *yes* will return results where the field is "yes"
* *yes OR no* will return all results&#x20;

For a more detailed explanation, read on.

When creating searches in Bubble, if you have a constraint on a yes/no field, it will always return either the "yes" options or the "no" options.

![Normal Bubble yes/no](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-M3xJujtten6m95J5MIR%2F-M3xM3iYgQv8DaDZxeCl%2Fyes-no-exclusive.gif?alt=media\&token=9ae279d6-f808-403c-bb33-afb3579ede0f)

The above image shows how a search either includes Inactive users or Active users, but not both. Here's the search logic used to produce this result:

![Logic with normal Bubble yes/no (no inclusive yesno option)](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-M3xJujtten6m95J5MIR%2F-M3xMXuY7doaq97d3_yZ%2Fsearch-for-users.PNG?alt=media\&token=6c25a975-6e54-4b4f-b0ed-7567e1ecabe7)

&#x20;Here's how this will look when set up with the Inclusive / Exclusive option set.

![Option set yes/no/yesno](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-M3xJujtten6m95J5MIR%2F-M3xRbYwRTvefSoUqUA4%2Fyes-no-inclusive.gif?alt=media\&token=153040e6-c1b9-432b-82ea-f96632cae8df)

![Logic with normal Bubble yes/no (no inclusive yesno option)](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-M3xJujtten6m95J5MIR%2F-M3xQWpvt5ahCo6GprqS%2Fsearch-for-users-yesno.PNG?alt=media\&token=b9715744-cadb-44d6-987f-aab9b6916b5f)

For a demonstration of how to use this in a real app, check out the Dropdown Users on the [admin](/canvas/2.0.0-1/using-the-template/reference/pages/owners-portal-page.md) page of the Canvas Starter Template.

The performance of these searches seemed to be about the same in our tests. Please let us know if you notice anything different.
