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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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,704 Super User 2026 Season 1 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,704 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 273

#3
Kalathiya Profile Picture

Kalathiya 232 Super User 2026 Season 1

Last 30 days Overall leaderboard