Enumerations Label As Value In Query Filter

Avatar

Avatar
Validate 1
Level 1
jianghait960580
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
jianghait960580
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
jianghait960580
Level 1

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

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

977 likes

Total Posts

1,096 posts

Correct reply

516 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

977 likes

Total Posts

1,096 posts

Correct reply

516 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
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)