cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kriggo15
Post Patron
Post Patron

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

View solution in original post

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
pre
Community Support
Community Support

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

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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