cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BlackRos
Frequent Visitor

How to do in CDS a comparison between a Two Option Set field and its value?

 
How to do in CDS a comparison between a Two 
Option Set field and its value?
I have the following condition that I corrected as syntax but due to the Two Option Set field it does not take the values ​​I expected. If I comment the Two Option Set part finds me the values.
 ('PDA Start Date' - DeltaAnticipoPDA <DateValue (Tomorrow) / * && DateValue (Tomorrow) <= 'PDA End Date' * /) && If (
            Not (IsBlank (ComboBoxUP_2.SelectedItems.'Post Office ')) && (Text (PDA State) <> ArchivedPDA) / * && Text (StatePDA_Active) = Active * /;
            'Post Office'. 'Post Office' in ComboBoxUP_2.SelectedItems.'Post Office ';
            false
        )

The Two option Set part is
/ * && Text (StatePDA_Active) = Active * /

 


2 REPLIES 2
yashag2255
Dual Super User II
Dual Super User II

Hi @BlackRos 

 

A better way to match the fields of option set is:

StatePDA_Active = ''StatePDA_Active (Entity Name)".Active

If you do not get this directly, you can take help from the intellisense and this will point you towards the right option.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

v-monli-msft
Community Support
Community Support

Hi @BlackRos ,

 

Can you explain what you want to achieve with sample data?

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (57,382)