web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Unable to filter table...
Power Apps
Answered

Unable to filter table when a cell has square brackets in it

(0) ShareShare
ReportReport
Posted on by 94

I have a Text Input search box, and a Gallery with a dataverse table as it's source.

 

I have a filter function applied to the Gallery which works fine until I try and search for something that has square brackets in it.

 

For example, in the name (primary) column called Clip_Name of the Dataverse table one of the clip name's is D001_C013_20220330_R[00000-00980].DNG When I search it doesn't find the clip. When I search D001_C013_20220330_R (removing the square brackets) it finds it.

 

It works fine when searching clip names that have rounded brackets in their name.

 

Any help greatly appreciated.

 

Many thanks,

Rob

Categories:
I have the same question (0)
  • charlessexton Profile Picture
    Super User 2024 Season 1 on at

    The reason why this happens is because when Power Apps requests the data from Dataverse it sends a request using a URL, and you're not supposed to send square brackets via a URL. So Power Apps encodes the [ to become %5B instead, but it doesn't get converted back by Dataverse.

     

    That's why it's happening. Unfortunately, I don't see a simple solution. You could disallow square brackets and convert the existing ones. I'd almost say this is a Power Apps bug.

  • charlessexton Profile Picture
    Super User 2024 Season 1 on at

    Actually, I've just had a thought and tested it out, and it works. You can replace the square brackets with a wildcard (%) and the search will work.

     

    charlessexton_1-1700148854334.png

     

    Substitute(Substitute(TextInput3.Text, "[", "%"), "]", "%")
  • RobChilds Profile Picture
    94 on at

    Thanks @charlessexton really good to know.

     

    Where would I put this code please. Here's my current code on the Gallery..

     

    Filter(
    DataverseTable,
    TextInput2.Text in Clip_Name
    )

     

    Thanks

  • Verified answer
    charlessexton Profile Picture
    Super User 2024 Season 1 on at

    Like this:

     

    Filter(
    DataverseTable,
    Substitute(Substitute(TextInput2.Text, "[", "%"), "]", "%") in Clip_Name
    )

     

     

    If you've found my post helpful, please mark it as a solution. 😊

  • RobChilds Profile Picture
    94 on at

    @charlessexton 

     

    Spot on!! Ah makes sense when you see it. Thanks so much, much appreciated!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard