Enumerations Label As Value In Query Filter | Community
Skip to main content
November 26, 2020
Solved

Enumerations Label As Value In Query Filter

  • November 26, 2020
  • 1 reply
  • 1568 views

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?

 

 

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

    

                         

 

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

 

Thanks,

Abel

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

Hi,

 

There are 2 usages of db enums in schema:

  • userEnum - Use @2449631 for everything, ignore existence of @2175539
  • dbEnum - Use @2175539 for value, @2449631 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

1 reply

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
November 26, 2020

Hi,

 

There are 2 usages of db enums in schema:

  • userEnum - Use @2449631 for everything, ignore existence of @2175539
  • dbEnum - Use @2175539 for value, @2449631 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

November 26, 2020
Thanks a lot, Jon