cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RobotRising
Frequent Visitor

Launching a Link from an EncodeUrl

Something I would think would be simple but running into a wall here. 

 

Working on a canvas app with a gallery. I have a column in a SharePoint list that is single line text and contains a url with spaces. 

 

I am trying to use the EncodeUrl function to remove the spaces and thus make any links in that column clickable so that they will launch without issue in a new browser window. 

 

I have tried quite a few ways of doing this but none of them allow the link to launch. 

 

I have tried:

 

  • EncodeUrl to ThisItem in an html text label
    • This encodes the link perfectly but will not launch
  • Adding the EncodeUrl to the OnSelect
  • Encapsulating the EncodeUrl in Launch function i.e. Launch(EncodeUrl(ThisItem.ThisField)) and adding to OnSelect
    • also tried this in a button
  • Creating a secondary label to pull the previous htmltext label data into a new html text label
  • a href containing the EncodeUrl function in an htmltext label

 

I am hoping this is possible as how else would this function be useful? 

 

Beyond this the only other thing I can think of doing would be to use Power Automate to EncodeUrl into a new field and using that field but this would require changing every item on the list, something I do not want to do. 

1 ACCEPTED SOLUTION

Accepted Solutions
RaashiSen
Community Support
Community Support

Hello @RobotRising ,

 

You can try using Launch(<labelname>.Text) in the 'OnSelect' to see if that works for you. LabelName here will be the Label where your original URL shows in the Singe Line of Text field, The 'Text' should be having ThisItem.ThisField.

 

Regards,

Community Support Team _ Raashi Sen
If this post helps, then please 'Accept' it as the solution to help the other members find it.

View solution in original post

2 REPLIES 2
RaashiSen
Community Support
Community Support

Hello @RobotRising ,

 

You can try using Launch(<labelname>.Text) in the 'OnSelect' to see if that works for you. LabelName here will be the Label where your original URL shows in the Singe Line of Text field, The 'Text' should be having ThisItem.ThisField.

 

Regards,

Community Support Team _ Raashi Sen
If this post helps, then please 'Accept' it as the solution to help the other members find it.

RobotRising
Frequent Visitor

Thank you Raashi!  

 

Didn't even need to use EncodeUrl at all, using the Launch function on the text label actually will properly encode the url on launching to a browser. 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,859)