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 / Incompatible types of ...
Power Apps
Unanswered

Incompatible types of comparison: Table and text cannot be compared

(0) ShareShare
ReportReport
Posted on by 9

Web capture_24-7-2023_123450_make.powerapps.com.jpeg

Web capture_24-7-2023_12385_make.powerapps.com.jpeg

bd920e17-332a-4333-9fc7-4366a2abb801.jpg

Hi there, I am trying to use Index Function within the filter function. If the combo Box is blank or empty, then it will either return all icon or use search box to find the according icon. Otherwise, it will return the icon that you want.

However, for some reason it appears with the error of incompatible datatype. Could anyone tell me as to why it happened? (For the combo Box, my code is Choices(LandingPageList.DescriptionList))

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,928 Most Valuable Professional on at

    Hi @Chanman1998 ,

    I am assuming here that your field DescriptionList is also multiple value, in which case you have a many-to-many relationship, so try this

    With( 
     {
     wData:
     Filter(
     'LandingPageList',
     StartsWith(
     Title, 
     SearchlnputBox.Text
     )
     )
     },
     If(
     IsEmpty(ComboBox.Selectedltems),
     wData,
     Ungroup(
     ForAll(
     ComboBox.SelectedItems as aSel,
     Filter(
     wData,
     aSel.Value in DescriptionList.Value 
     )
     ),
     "Value"
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • v-hanytian-msft Profile Picture
    Microsoft Employee on at

    Hi @Chanman1998 ,

     

    May I ask what data source you have used?

    Is the type of field DescriptionList is Choice?

     

    I am confusing about it will return the icon that you want. Can you give a simple example?

     

    According to the error message we suggest you replace "=" into "in".

     

    If you need any further assistance about this issue, please do not hesitate to reply to me.

     

    Hope this will help you,

    Best Regards,
    Tina

  • Chanman1998 Profile Picture
    9 on at

    I will check, see if that is possible. Many thx

  • Chanman1998 Profile Picture
    9 on at

    1. I am using SharePoint list as my data source and yes my descriptionlist is Choice. 

    2. What I mean, was that if I select my preferred choice such as Human Resources for instance, then it will return those pages that are categorized of this category Human Resources. 

    3.I have tried to use "in" but it does not work. 

    Web capture_24-7-2023_151216_make.powerapps.com.jpeg

  • WarrenBelz Profile Picture
    154,928 Most Valuable Professional on at

    @Chanman1998 ,

    You might confirm whether DescriptionList is a single or multiple value choice field.

  • Chanman1998 Profile Picture
    9 on at

    Chanman1998_0-1690188558423.png

    I think I select yes for allowing multiple selections hence the error occured. I have fixed it now, many thx

     

  • WarrenBelz Profile Picture
    154,928 Most Valuable Professional on at

    @Chanman1998 ,

    So it is working now with a single selection ?

  • Chanman1998 Profile Picture
    9 on at

    yes I think many to many operators does not work when using index function. Anyway fixed it , many thanks 

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard