Enumerations Label As Value In Query Filter

Avatar

Avatar

jianghait960580

Avatar

jianghait960580

jianghait960580

26-11-2020

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

wodnicki

MVP

Avatar

wodnicki

MVP

wodnicki
MVP

26-11-2020

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

Answers (0)