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 / Handling items with tr...
Power Apps
Unanswered

Handling items with troublesome characters(# primarily) in the filename).

(0) ShareShare
ReportReport
Posted on by 56

Not sure if I'm missing something or if it's just a limitation, but I have a powerapp with a simple Gallery showing the attachments to a sharepoint list item which they're manipulating in a form. The gallery just shows the attachments as an image and then opens the attachments in a browser as the item's OnSelect property with Launch(ThisItem.AbsoluteUri) for when the users need to look more closely at the attachment. 

 

This seems to break if the attached item's filename contains a # sign, like in the attached image here. The preview image doesn't display anything, and the launched URL doesn't convert the # sign to %23, which is what happens when opening the attachment directly from the sharepoint list item. While it seems like it would be relatively simple to do a substitution for the # sign, I can't help but think there might be other characters which would cause similar issues, so I was wondering if there was a cleaner/more correct recommendation for how to handle this.  

 

confusing #breaking.png
Categories:
  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @MQN 

    You can handle this by calling the EncodeUrl function like so:

    Launch(
     EncodeUrl(ThisItem.AbsoluteUri)
    )
  • MQN Profile Picture
    56 on at

    Using that seems to mangle the slashes in the URL. Sticking EncodeUrl(ThisItem.AbsoluteUri) gets me a line of text that(when stuck in a text box) starts with https%3A%2F%2F and won't launch.

     
     
  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @MQN 

    If it's just the final part of the URL that you want to encode, you can use this syntax:

    With({inputURL:Split(ThisItem.AbsoluteUri, "/")},
     Concat(FirstN(inputURL, CountRows(inputURL)-1), Value & "/")
     & EncodeUrl(Last(inputURL).Value)
    )

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard