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 / How to Trim space betw...
Power Apps
Answered

How to Trim space between a hyperlink

(0) ShareShare
ReportReport
Posted on by 258

How to I trim space which in the middle of my hyperlink I had used Trim() and Trim Ends() but my problem is I am getting my hyperlink in my email from PowerApps and its having space in the middle of the link. Substitute() is not working. 

 

B8_0-1666248130269.png

 

Categories:
I have the same question (0)
  • StretchFredrik Profile Picture
    3,395 Super User 2025 Season 2 on at

    Hello,

     

    try the following:

     

    Substitute(YourText," ","")

     

    If its a url you might need to replace the spaces with %20

  • B8 Profile Picture
    258 on at

    it is a URL how and where should i add %20 can you share it. i had given an picture of my power apps

     

  • Verified answer
    StretchFredrik Profile Picture
    3,395 Super User 2025 Season 2 on at

    Usually URLS replace spaces with %20, so you could do:

     

    Substitute(YourText," ","%20")
  • B8 Profile Picture
    258 on at

    Thanks it worked 🙂 and is their any way if i can add & instead of %20 

  • StretchFredrik Profile Picture
    3,395 Super User 2025 Season 2 on at

    If the url points to something specific you can't change it, its the way URLS are read. In some cases you can use "+" instead of "%20", not sure in this case. 

  • timl Profile Picture
    36,393 Super User 2025 Season 2 on at

    @B8 - Whilst substitute will work in your case, I would also recommend the use of the EncodeURL function, which is designed for this scenario.

    https://learn.microsoft.com/en-gb/power-platform/power-fx/reference/function-encode-decode

    EncodeURL(yourHyperlink)

    A hyperlink can contain many special characters - not just spaces. EncodeURL takes care of all these special characters.

  • StretchFredrik Profile Picture
    3,395 Super User 2025 Season 2 on at

    Did not know that existed, good alternative solution @timl 

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard