Update Thing In Workflow When Data Type is based On Option Set to specific option

I cannot figure out how to map a specific option from an option set when updating a thing.

I have a data type that is designed to be a dropdown with a fixed set of options. This data type is created from an Options Set “Deal Pipeline Status Options”.

I perform an API call that pulls the “Deal Pipeline Status” from another software and I want to update a corresponding Thing with this corresponding Option Set option. If it’s “Qualified Lead” in the payload, I want to update the Thing’s “Deal Pipeline Status” data to the “Qualified Lead” option.

Can someone please provide some guidance on how to do this. I feel like this should be easy, but I’m totally stuck.

Just do the folowing:

Get an option
All Options
This Option’s Display = API call’s Deal Pipeline Status
First Item

1 Like

Thanks for your help on this Adam. It really helped and led to a solution.

I got stuck on the filter portion but managed to figure it out. It’s a matter of just trying to figure out Bubble’s syntax, but the basic overview you provided was right on.

For anyone else trying to figure out how to set an Option Set option, this is what I figured out.

Adam: “Get An Option > All Options > Filtered > First Item”

For The Filter: Create a constraint to match your search variable. It must match to find it. In this situation we were trying to match The Option Set Display which was “Qualified Lead” but the match variable was “qualified_lead”, so it wasn’t find it. We created a new field in the Option Set called Mothra Id (mothra is our database name) and added the “qualfied_lead” to that option.

We could have also done some string manipulation to make it match too but decided against it.

Then when we ran the filter we set it to search the Option Set Id instead of the Display Name field and that found it and set that variable to the Option Set option “Qualified Lead”.

I set everything into a state that I could reference later on.

Thanks for the solution but it seems quite complicated. I’m wondering if using a custom data type rather than an option set is then easier and overall a better alternative than option set. Custom data types fields can be easily compared and used. I’ve had many issues trying to use option sets ending up having to filter or create separate steps just to fill a field in a new thing…