Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Enumerations Label As Value In Query Filter

jianghait960580
Level 1
Level 1

Dear,

    I'll describe my problem first. Enumerations comes from Salesforce synchronization. The useful values are Label and Internal Name. However, the values between the two are inconsistent. The database stores the value of Internal Name, but when I do Query, THE SQL splicing takes the Label of Enumerations as the condition to Query. Is there no transformation here?

jianghait960580_2-1606379404289.png

 

jianghait960580_1-1606379396708.png

 

   However, in the Schema, Enumerations syntax, the forwarding between Label and value can be implemented.

    

                         jianghait960580_0-1606379370750.png

 

I expect that enumeration can also achieve the effect of syntax in enumeration in schema.

 

Thanks,

Abel

 

 

Enumerations
1 Accepted Solution
wodnicki
Correct answer by
Community Advisor
Community Advisor

Hi,

 

There are 2 usages of db enums in schema:

  • userEnum - Use @label for everything, ignore existence of @name
  • dbEnum - Use @name for value, @label for display (your expectation)

 

Product doc is unhelpful and also wrong here, so use xtk:operator/@securityZone as a reference.

  • userEnum (string): receives the internal name of an “open” enumeration. The values of the enumeration can be defined by the user in the interface.
  • dbEnum (string): receives the internal name of a “closed” enumeration. The enumeration values must be defined in the <srcschema>. 

 

Thanks,

-Jon

View solution in original post

2 Replies
wodnicki
Correct answer by
Community Advisor
Community Advisor

Hi,

 

There are 2 usages of db enums in schema:

  • userEnum - Use @label for everything, ignore existence of @name
  • dbEnum - Use @name for value, @label for display (your expectation)

 

Product doc is unhelpful and also wrong here, so use xtk:operator/@securityZone as a reference.

  • userEnum (string): receives the internal name of an “open” enumeration. The values of the enumeration can be defined by the user in the interface.
  • dbEnum (string): receives the internal name of a “closed” enumeration. The enumeration values must be defined in the <srcschema>. 

 

Thanks,

-Jon

View solution in original post