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 / Gallery Filter Binary ...
Power Apps
Answered

Gallery Filter Binary operator with incompatible types was detected

(0) ShareShare
ReportReport
Posted on by 467

I have 2 drop downs and a gallery.  Customers & Projects are entities in Dynamics Finance and Operations.  Dropdown 1 and 2 are working just fine.

DropDown1 - Sort(Customers, Name, Ascending)

DropDown2 -Distinct(Filter(Projects, 'Customer account' = CustomerNameDD.Selected.'Customer account'),'Project stage')

 

Gallery

Filter(Projects, And('Customer account' = CustomerNameDD.Selected.'Customer account', ('Project stage') = ProjectStageDD.Selected.Result))

 

The Gallery has the Red error indicating "The Requested operation is invalid.  A binary operator with incompatible types was deteced.  Microsoft.Dynamics.DataEntities.ProjStatus and Edm.String for operator kind Equal

 

If I change the foruma to use a in my values return however now we are dealing with the 500 record delegation issue.

Filter(Projects, And('Customer account' = CustomerNameDD.Selected.'Customer account', ('Project stage') in ProjectStageDD.Selected.Result))

 

I found another person with the same error using Dynamics 365 and it was reccomended ot use the lower function on the column.  I decided to try this on the Project stage on DropDown2 and the Gallery filter resulting in lowering all characters to lowercase.

 

DropDown2

Distinct(Filter(Projects, 'Customer account' = CustomerNameDD.Selected.'Customer account'),Lower('Project stage'))

 

Gallery

Filter(Projects, And('Customer account' = CustomerNameDD.Selected.'Customer account', Lower('Project stage') = ProjectStageDD.Selected.Result))

 

Strange enough, this works now and is returning values in the Gallery and it's not using the = function however suprisingly I am once again getting the Delegation warning about 500 records.  This application will return over 500 within a few months of launching.  Any guidance here would be apprciated.

Categories:
  • Dudditz Profile Picture
    467 on at

    Okay, so we are running into this issue even with simple gallery filters.

    An error has occured.  A binary operator with incompatible types was detected.  Found Operand types

    Gallery.  Found Operand types, Microsoft Dynamics.DataEntites.ProjStatus and Edm.String

    Filter(Projects, 'Project stage' = "InProcess")

     

    Red Error, no data returned with the error above.

    Change the = to an in and it returns data however delegation issue.  Running in circles here, seems like anything we build consuming from Dynamics Finance and Operations we are getting these errors on a variety of fields.  Multiple tickets open with Microsoft and very little responses except they are looking into it after several weeks.

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

    Hi @Dudditz ,

     

    Could you please share more details of your fields in your two entities?

    What is the field type of Customer account and Customer Name and Project stage in your Projects enity?

     

    Best Regards.

    Yumia

     

  • Dudditz Profile Picture
    467 on at

    Hi Yumia, thanks for the response.

     

    all 3 are string

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

    Hi @Dudditz ,

     

    Could you please should more details of the fields in your entities?

    I test as next:

    Data Source:

    20190404Customers.PNG

    20190404Projects.PNG

    App Test:

    20190404gallery.PNG

     

    Best Regards.

    Yumia

  • Dudditz Profile Picture
    467 on at

    Hi there Yuxima, I see your entities are within the CDS however mine are coming from Dynamics Finance and Operations.  What more are you looking for regarding our entities?  These are right out of the box, unmodified from Dynamics Finance and Operations

     

     I rebuilt everything in a new PowerApp, same issue, random unexplainable erorrs.

    Gallery1

    Filter(Projects, 'Customer account' = Dropdown1.Selected.'Customer account', 'Project group' = Dropdown2.Selected.Value, 'Default dimension display value' = Dropdown3.Selected.Value, 'Project stage' = Dropdown4.Selected.Value)

     

    Two datasources we are using from Dynamics Finance & Operations

    2019-04-05_15-30-01.jpg3.jpg2.jpg

     

    2019-04-05_15-30-01.jpg
  • Dudditz Profile Picture
    467 on at

    Here is DropDown4

    My formula,

    If(!IsEmpty(Dropdown3.Selected), Distinct(Filter(Projects, 'Customer account' = Dropdown1.Selected.'Customer account', 'Project group' = Dropdown2.Selected.Value, 'Default dimension display value' = Dropdown3.Selected.Value), 'Project stage'))

    6.jpg4.jpg4.jpg

  • Jt0 Profile Picture
    12 on at

    Hi @v-yuxima-msft @Dudditz 

     

    I am also facing a similar issue when trying to filter my finance and operations data source on an enum value. For my situation CDS is not an option and am also not able to convert the enum to text due to delegation issues.

     

    This will work in Odata for your project stage enum if you use the syntax below in your filter..I just haven't found a way to get the connector to mimic this as it will try and treat it as a string.

     

    ProjectStage eq Microsoft.Dynamics.DataEntities.ProjStatus'ProjectStageDD.Selected.Result'

     

    There doesn't seem to be a way to cast your string as an enum value even if you know the correct syntax.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    So there is no solution other than trial and error?

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    In Power Automate I can filter Projects from D365FO with ProjectStage eq Microsoft.Dynamics.DataEntities.ProjStatus'InProcess' and dataAreaId eq 'USMF'

    Mind that stage and status are causing confusion

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    in Power apps it is Filter(Projects,'Project stage' = "InProcess")

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard