cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ezi79
Helper III
Helper III

Incompatible types for comparison record text

hello 

I am trying to do very simple filter on location (it is a choice column in SP list) I have done this before on my previous app its working fine but with this i am getting incompatible type of comparison record text error . 

CBloc is combo box 

CbLoc Filter('Power app',IsBlank(CBLo.SelectedItems.Value ) || IsEmpty(CBLoc.SelectedItems) || Location= CBLocationSearch.Selected.Value)

 

Any idea why its not working

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@ezi79 

This like the other one is that you are trying to compare a record to a string.  In this case the record is Location.

 

Your formula should be:

Filter('Power app', 
    IsBlank(CBLo.SelectedItem.Value )|| Location.Value = CBLocationSearch.Selected.Value
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
RandyHayes
Super User
Super User

@ezi79 

This like the other one is that you are trying to compare a record to a string.  In this case the record is Location.

 

Your formula should be:

Filter('Power app', 
    IsBlank(CBLo.SelectedItem.Value )|| Location.Value = CBLocationSearch.Selected.Value
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Lovely thank you very much 

@RandyHayes -------------------Please ignore i got the filed names wrong...

So I applied the similar formula for singleline of text  filed in SP 

But the filter does not work when i select the item from combo box and hover over formula it returns blank value

CC filed is text field in SP

Itemproperty for combo is :Sort(Distinct('powerapp','CC'),Result,Ascending)

And filter is 

Filter(Coll, IsBlank(cmbLM.SelectedItems.Result) || IsEmpty(cmbLM.SelectedItems) || 'CC'= (cmbLM.Selected.Result))

Although it doesnt give any error it also doesnt filter. Could you please help me with this one too?

Many Thanks in advance 

@RandyHayes 

Good morning Randy 

I enabled multiple selection  for the combo box although the  filter bit working correctly when I select multiple values to filter it only show the result for last selected item.  

any idea why is that ? 

Filter('Power app', IsBlank(CBLoc.SelectedItems.Value) || IsEmpty(CBLocSearch.SelectedItems) || Loc.Value = CBLoc.Selected.Value)

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,193)