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

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.
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.
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

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,279)