Back

Retrieving Enum Values

  • 0
  • Android
  • React Native
vikar
5 Jul, 2024, 10:14

I'm very new to react-native and appwrite. I created an Enum attribute 'category' containing several elements. Now I want to fetch all the enum values to set a filter option. How will I get the all enum elements?

TL;DR
Title: Retrieving Enum Values in Appwrite SDK Developers typically can't fetch all enum values directly in Appwrite SDK, only the current value is retrieved. One option is to use a separate attribute to list all values or submit a feature request to the repository to include this functionality.
darShan
5 Jul, 2024, 10:23

You cannot get all enums, unless using server side sdk. When fetching the docs, only current value is retrieved ig.

darShan
5 Jul, 2024, 10:24

maybe use a separate attribute to list all values or best is to create a feature request on the repo. I'd like the later and be added to the sdk.

vikar
5 Jul, 2024, 10:30

Will try. Thank you

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more