ENUM Column in Modal Edit Form

I have a Retool DB column that is an ENUM. The ENUM options are either all text or a combination of one letter and one number (e.g., 'V5').

I created a blank form and generated the form from a table in my app. When I loaded a table record into the form, the Select created for the ENUM would not show the existing ENUM option. The Select was blank. I discovered after some staring, that the table was formatting the ENUM value using _.startCase, which forces a space between the letter and number, which prevented the Select from finding the correct ENUM option. Deleting the _.startCase seemed to solve the problem.

Then, I moved the form into a modal, and the problem returned. The Select does not display the existing ENUM value. I've hacked around the problem by setting the Select default to the value of the column, but I should not have to do that.

What am I missing?

Check the form select dropdown again to make sure it does not have the _.startCase added by default.

If you come across this post, looking to work with ENUMs, visit this post.

1 Like