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 / DefaultSelectedItems’ ...
Power Apps
Answered

DefaultSelectedItems’ property of ComboBox control - Incompatible type for comparison

(0) ShareShare
ReportReport
Posted on by 116

In my gallery I have a ComboBox control that is using a SharePoint list as the data source.

The Items property of the ComboBox is:

Choices('OTS Part Details'.CADRequirements)

I am trying to figure out the correct formula for the DefaultSelectedItem property for the ComboBox and receive the following error:

Incompatible type for comparison. These types can't be compared: table, text

 

Here is the formula that gives this error.

Filter('OTS Part Details', CADRequirements = "OrCad" Or "Mentor" Or "Altium")

I have tried many variations and cannot determine the correct formula to clear this error.

Hoping someone can help!

 

Regards,

Jayne

Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @JayneButton - assuming the "CADRequirements" field is a single-select Choice datatype, could you try:

     

    Filter('OTS Part Details', CADRequirements.Value = "OrCad" || CADRequirements.Value = "Mentor" || CADRequirements.Value = "Altium")

     

  • JayneButton Profile Picture
    116 on at

    Hello @Amik 

     

    CADRequirements is a Choice column so I assume the formula will be different.

    I tried the formula you suggested and still receiving the error.

     

  • JayneButton Profile Picture
    116 on at

    Hello @Amik 

    CADRequirements is a Choice column that uses checkboxes to allow multiple selections so I assume the formula will be different.

    I tried the formula you suggested and still receiving the same error.

  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @JayneButton -

     

    As stated, the method provided above assumes the Choice field is single select.

     

    For multichoice, use either:

     

    Filter(
     'OTS Part Details',
     "OrCad" in CADRequirements.Value || "Mentor" in CADRequirements.Value || "Altium" in CADRequirements.Value
    )
    

     

    Or:

     

    Filter(
     'OTS Part Details',
     true in ForAll(
     [
     "OrCad",
     "Mentor",
     "Altium"
     ],
     ThisRecord.Value in CADRequirements.Value
     )
    )

     

     

    Note that for both methods, the ".Value" syntax will need to be entered manually. In other words, enter "CADRequirements.Value" as shown. This is because for whatever reason, the Value attribute is not automatically detected in intellisense.

  • JayneButton Profile Picture
    116 on at

    @Amik Thanks very much for the help.

     

    Jayne

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard