cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dudditz
Level 8

Gallery Filter Binary operator with incompatible types was detected

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.

10 REPLIES 10
Dudditz
Level 8

Re: Gallery Filter Binary operator with incompatible types was detected

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.

Community Support Team
Community Support Team

Re: Gallery Filter Binary operator with incompatible types was detected

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
Level 8

Re: Gallery Filter Binary operator with incompatible types was detected

Hi Yumia, thanks for the response.

 

all 3 are string

Community Support Team
Community Support Team

Re: Gallery Filter Binary operator with incompatible types was detected

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
Level 8

Re: Gallery Filter Binary operator with incompatible types was detected

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

 

Dudditz
Level 8

Re: Gallery Filter Binary operator with incompatible types was detected

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
Level: Powered On

Re: Gallery Filter Binary operator with incompatible types was detected

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.

 

adriouwendijk
Level: Powered On

Re: Gallery Filter Binary operator with incompatible types was detected

So there is no solution other than trial and error?

adriouwendijk
Level: Powered On

Re: Gallery Filter Binary operator with incompatible types was detected

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

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (3,761)