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 II
Super User II

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 II
Super User II

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

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (39,170)