Change Singular Field to List

Is there any easy way to change a singular field into a list? How is there a checkbox for it in custom states, but not the database itself?

Easiest way would be to check the box when creating a new data field in the database.

Screen Shot 2020-11-12 at 2.15.47 AM

Yeah it’s tedious

If trying to change a data field you previously created it is not possible…you have to make it a list when first creating the data field.

It would be fantastic if Bubble would make it function the same way as a custom state, in that you can change it after creation.

4 Likes

Yes. PLEASE! Bubble. I stupidly didn’t set up my app so a User could be in multiple Departments (academic departments). I would love to be able to change the field Department from a single value to alist. I get that in the back end a lot of stuff would have to happen and I guess every time a user’s Department is referenced I’d have to specify which. Darn.

I mean it’s still do-able. Just make the new field, but this time check the box to make it a list. Then run a backend API workflow on every User. You would do “a” for the parameter, with the type User. then for the first action do “Make changes to a thing” (type is User) and you’ll be changing “a”, and modify your newly created field that is a list of Departments, and do “add a’s Department”.

In your app now you’ll have to go around anywhere you have referenced the single field Department and change it to a repeating group with the data source to the User’s Departments (the list version). Any dropdowns you have to pick departments or anything would also need to be changed to accommodate working with a list now.

If you delete the single field of Department, you can go to settings and optimize the app, and just check only the deleted field Department. Once it deletes the field it will throw any errors that you need to correct that are referencing the single Department field