web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dataverse Choice Colum...
Power Apps
Unanswered

Dataverse Choice Column Comparison

(0) ShareShare
ReportReport
Posted on by 1,104

Hi,

 

I have a form where I want to make a field required if a dropdown contains a particular value. The values for this dropdown are taken from a choice column in the Dataverse called Calculation.

 

I thought I could just do:
If(DataCardValue4.Selected.Value = 100000002, true, false)

or:

If(DataCardValue4.Selected.Value = "Average by Week", true, false)

 

100000002 is the numeric value of the choice in the Dataverse. I get an error that says "Incompatible types for comparison: These types can't be compared: OptionSetValue(Calculation), Text

 

Does anyone know how to do this comparison? Bear in mind, I am not checking a value in the Dataverse table, just checking what value is currently selected in the dropdown on the data card for the form.

 

Thanks

 

Sean

I have the same question (0)
  • Ram Prakash Duraisamy Profile Picture
    5,580 Super User 2025 Season 2 on at

    Hello @SeanHenderson,

     

    You can try below code

     

    If(DataCardValue4.Selected.Value = 100000002,'COLUMNNAME (TABLENAME)'.TABLEVALUE,true, false)
    
    
    (Eg)
    'Status (Booking Updates)'.Active

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

  • SeanHenderson Profile Picture
    1,104 on at

    Hi @rampprakash 

     

    I'm not sure what you mean by COLUMNNAME (TABLENAME)'.TABLEVALUE. 

     

    For testing, in the Dataverse I have a table called CTRs and a choice column called optionTest.

     

    This is on a new form, there is no value stored in the Dataverse to look up for the record. The condition needs to be entirely dependent on what is currently displayed in the Combo Box for the datacard.

     

    Sean

  • Verified answer
    Ram Prakash Duraisamy Profile Picture
    5,580 Super User 2025 Season 2 on at

    Hello @SeanHenderson,

     

    As per your previous chat,

     

    Table Name : CTRs

    Choice Column Name :optionTest

    Choice Column Name : Average by Week

     

    So you need to Try below

     

    If(DataCardValue4.Selected.Value = 'otionTest(CTRs)'.Average By Week,true, false)

     

    Please mark as Answer if it is helpful and provide Kudos

     

     

    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

    Blog : https://microsoftcrmtechie.blogspot.com

     

  • SeanHenderson Profile Picture
    1,104 on at

    Thank you, that did it. I needed to reference the name of the choice not the name of the choice column.

     

    Sean

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 759 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 310 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 228

Last 30 days Overall leaderboard