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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,904)