cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kriggo15
Responsive Resident
Responsive Resident

Searching and Filtering Gallery Error - wrong column type

I have a gallery that I'm trying to filter and search on. Everything works until I try to add the "ID" field from my SharePoint List. I get an error: "Wrong column type, Expects text type.". I've tried to cast the field as a text value and haven't had any luck there either.

 

Search(
    Filter(
        colAllRequestsConsultation,
        If(
            chkStatusClosed.Value = false,
            true,
            If(
                chkStatusClosed.Value = true,
                Status.Value in "Closed",
                true
            )
        ) && If(
            chkStatusOpen.Value = false,
            true,
            If(
                chkStatusOpen.Value = true,
                Status.Value in "Open",
                true
            )
        ) && TextInput2.Text in ID
    ),
    TextInput2.Text,
    "Title",
    "ID"
)

 
error2.png

1 ACCEPTED SOLUTION

Accepted Solutions
PowerAddict
Super User
Super User

One way is to use AddColumns in the following way:

Replace colAllRequestsConsultation inside Filter with

AddColumns(colAllRequestsConsultation, "ID_Text", Text(ID))

Keep me in mind though that AddColumns is subject to delegation so as long as you have less than 2000 records you should be ok.

Let me know if this helps.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

View solution in original post

4 REPLIES 4
PowerAddict
Super User
Super User

One way is to use AddColumns in the following way:

Replace colAllRequestsConsultation inside Filter with

AddColumns(colAllRequestsConsultation, "ID_Text", Text(ID))

Keep me in mind though that AddColumns is subject to delegation so as long as you have less than 2000 records you should be ok.

Let me know if this helps.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

Glad I could help! Good luck with the rest of the app! Feel free to reach out in case of any questions!

Thanks!
Hardit Bhatia
https://thepoweraddict.com

Hello @PowerAddict 

I am in need of help related to the same issue for a customer and it is business critical . Let me know how I can connect offline please.

 

Thanks

Hi @pre 

 

I would love to try to help you out. If you want to connect offline, you can send me an email at hardit.bhatia@thepoweraddict.com

 

Looking forward to hearing from you!

 

Thanks,

Hardit

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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,866)