So I am receiving data from a Xano DB and I have a “type” field in my DB that is an enum. I have set these values in my bubble application as an Option Set, exactly how they are in my Xano D, and I have set the field to the option set when I receive the data in the API Connector.
However, my enum values are in camel case, but when the data is retrieved in a repeating group, Bubble seems to change the text to all lower case before looking for the option in the Option Set. For example, my type in the DB and in the option set is “inStore”, however when the data gets to my repeating group, it shows as “instore”.
When I inspect the repeating group, the field has the message: (Option with invalid id “instore” for option set “Option Set”).
Enum values that are all lowercase are working fine, so I know if I just change everything to lowercase, I can solve this issue, however, my Xano DB is pretty advanced and the changes would take me ages to change on that end.
I would like to know if anyone has had a similar problem and if there are any alternative fixes anyone can think about.
You actually set one of the Xano’s response fields as an Option Set? Interesting; I didn’t know that you use an option set for something outside of Bubble.
I would contact support to make sure this is intended behavior. Smells like a bug.
A work around would be to set the field with something like
get all options: filtered by this field:lowercase is this option's Display: first item (or something along those lines).
Yes, you can select the data type of your return fields in the API connector. However, I do remember trying to do this a while ago and it wasn’t possible, so I think it was added fairly recently.
Thank you for the suggestion, however, I can’t access the value of the response if it is not one of the Option Set values. So it is expecting an Option Set value or nothing. I will get in touch with support.
I am assigning the type of a specific field returned from my Xano API to an option set. So the value of the field is one of the options in my option set. It works perfectly when the value of the field is lowercase, but doesn’t work when the value is in camelCase.