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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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