Return of enum values
How do I return enum values in a variable as part of a GET api? The enum values will be used in a drop down as part of updating data from the GET api.
Or do I get the enum values in another way for my front end?
Best Answer
-
You can always create an additional table with those enums and call it from your frontend.
Answers
-
Hi,
usually when you have enum values that are rather constant like categories of products for example it's better to have them saved on the fronted side and not use API calls to get them, unless they constatly change and you need to provide them dynamically
-
The question is how to get them to the frontend? Is it possible? What is the idea with enums in Xano if you can't use them. To use them only locally in Xano must be a rare special case? (And it is not best practise to spread maintenance of master data in applications).
-
Ok. That means that there is no way to include the enums, as they are defined in a table, to any API. It would be nice if that fact was stated in documentation. Felt like a fool searching for a solution.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback