# Bubble data api constraint on an option set field

**URL:** <https://forum.bubble.io/t/bubble-data-api-constraint-on-an-option-set-field/325916>\
**Category:** APIs\
**Created:** [June 7, 2024, 7:21pm UTC](https://forum.bubble.io/t/bubble-data-api-constraint-on-an-option-set-field/325916 "2024-06-07T19:21:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joey1](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@joey1](https://forum.bubble.io/u/joey1)\
**Post date:** [June 7, 2024, 7:21pm UTC](https://forum.bubble.io/t/bubble-data-api-constraint-on-an-option-set-field/325916/1 "2024-06-07T19:21:16Z")

</div>

I saw on some other threads that it appears to be not possible to filter on fields which are option sets using the data API.

The workaround is to use the workflow API and match the option set manually.

Is there any plan to fix this?

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [June 7, 2024, 7:22pm UTC](https://forum.bubble.io/t/bubble-data-api-constraint-on-an-option-set-field/325916/2 "2024-06-07T19:22:41Z")

</div>

you could add another field to the data type that is the option set value in text form, so the field is text, then you can filter on it. I do this often to be able to sort by it.

---

<div class="post-metadata">

**Author:** ![joey1](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@joey1](https://forum.bubble.io/u/joey1)\
**Post date:** [June 11, 2024, 3:35pm UTC](https://forum.bubble.io/t/bubble-data-api-constraint-on-an-option-set-field/325916/3 "2024-06-11T15:35:56Z")

</div>

but then you need to maintain 2 data fields. unless you’re saying there’s a way to tie the two values so they are always in sync?

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [June 11, 2024, 4:27pm UTC](https://forum.bubble.io/t/bubble-data-api-constraint-on-an-option-set-field/325916/4 "2024-06-11T16:27:07Z")

</div>

> [@joey1](#):
>
> you need to maintain 2 data fields

Yes

> [@joey1](#):
>
> unless you’re saying there’s a way to tie the two values so they are always in sync?

Yes

When you need to modify a thing, to change 1 data field on it, you can actually change all or only as many data fields on that thing in the single make changes to thing action.

So, when you were to already have had a workflow action for make changes to a things status field that is related to an option set, you will simply add to that action the other field that is the text representation of the field related to the status.

---

<div class="post-metadata">

**Author:** ![joey1](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@joey1](https://forum.bubble.io/u/joey1)\
**Post date:** [August 23, 2024, 3:02am UTC](https://forum.bubble.io/t/bubble-data-api-constraint-on-an-option-set-field/325916/5 "2024-08-23T03:02:00Z")

</div>

For anyone coming across this this now seems to be possible. I can filter on option set constraints
