so i have an enum (not mine) that has the following values
Enum
A
B
C
D
E
with isExtensible true, and there is an extension to it (not mine)
in the UI i'm getting that this record has an Enum B, but in SQL database i'm getting 0. shouldn't 0 be A not B so how come? this happens to several values
Hi junior AX,
Which enum are you working with?
Hi Gunjan,
it's a customized one
Hi jumior AX,
The values are stored in the database - ENUMIDTABLE and ENUMVALUETABLE.
Please check this post and see the values stored for the customized enum.
Enums are stored as numbers, not strings. If you look at the type in database, you'll indeed see it's not string, therefore it's impossible to store values like A and B.
It's much more efficient for storing and querying.
So i should rely on the values coming from the database and not counting manually. Thank you
Hi Martin,
I mean the label was A B C D and normally A would mean 0, B would mean 1,...etc
But in the database enum that had value B, it's integer was 0
You should never try to guess the numbers by yourself. They don't have to be sequential and in case of extensible enums, the values can be different in different environments. Use enum values (such as NoYes::Yes) in your code; don't refer to the underlying numbers.
If the enum was not Extensible then it will be sequential?
because once i had to put a range on a data entity datasource like this:
(((Status == 10) && (Filed1 == "")) || (Status == 15))
i was forced to use enum numbers because there is another field in the range as you can see. But this status enum was not extensible. So the value won't be different in other environments right?
No, the fact that they don't have to be sequential applies to all ernums. Only the other statement (the values can be different in different environments) is specific to extensible enums.
If I was you, I would create a boolean computed column wrapping this logic, which would be trivial to filter by - and your problem would disappear.
1. So you mean if it was extensible and in the dev environment i put this condition
and if it was then moved to UAT, then Status ==10 might mean something other than the one in DEV?
But if it was not extensible, then the values will be exactly the same and there is no risk right?
2. let's say i created a boolean computed column, how i'm going to put the range on the data entity dataSource and replace this:
with the boolean value of the computed column?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,167
André Arnaud de Cal... 867 Super User 2025 Season 2
Sohaib Cheema 617 User Group Leader