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

Announcements

News and Announcements icon
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:
  • charlessexton Profile Picture
    11 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
    11 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
    11 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard