cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JackHindley
Level: Powered On

SharePoint rich text field as HTML text in PowerApps incl hyperlinks

I am using PowerApps to view SharePoint list items that have a rich text field that includes hyperlinks, so when I present those fields in PowerApps I have to switch the default text field for an HTML text field and insert "Parent.Default" as the HTML text data.

 

If the hyperlinks in those SharePoint fields point to external web links then all is fine but when those links point to other parts of the same SharePoint site, SharePoint automatically crops the https://sharepointdomain.com part and the link then reads, e.g. /sites/name/sitepages/content.aspx.

 

Since PowerApps was asked to read the SharePoint field exactly, those shortened links don't work. The links are interpreted as https://eu.create.powerapps.com/sites/.../...

 

I am looking for a SharePoint or PowerApps fix here.

 

This query proves very difficult to search for because its keywords are generally used in other contexts so if anyone can remember where a similar discussion took place I'd be happy to go there instead. Thanks for reading!

1 ACCEPTED SOLUTION

Accepted Solutions
JackHindley
Level: Powered On

Re: SharePoint rich text field as HTML text in PowerApps incl hyperlinks

So this works brilliantly. I will continue to look for a SharePoint fix but I imagine this will work for some time.

 

Thank you so much!

View solution in original post

4 REPLIES 4

Re: SharePoint rich text field as HTML text in PowerApps incl hyperlinks

Thats the beauty (well...) of SharePoint. 🙂

 

What if you run a substitute on the PowerApps side on all links? All Sharepoint links will start with /sites/ which means you can do this:

 

substitute(var_URL,"/sites/","https://yourtenantname.sharepoint.com/sites/")

It will, of course, mess upp correct links that happen to include "/sites/" but that can be prevented by:

 

if("http" in var_URL, var_URL, substitute(var_URL,"/sites/","https://yourtenantname.sharepoint.com/sites/"))

That line will return the url if it already includes "http" and otherwise it will fix the broken url.

 

Quite ugly, but i think it will fly.

JackHindley
Level: Powered On

Re: SharePoint rich text field as HTML text in PowerApps incl hyperlinks

So this works brilliantly. I will continue to look for a SharePoint fix but I imagine this will work for some time.

 

Thank you so much!

View solution in original post

Re: SharePoint rich text field as HTML text in PowerApps incl hyperlinks

Great!

 

Please mark as solution.

gg-QUT-Ci
Level: Powered On

Re: SharePoint rich text field as HTML text in PowerApps incl hyperlinks

I'm  still having problems with this solution. In the HtmlText field I'm using:

 

Substitute(Parent.Default,"/sites/","/https://my site.sharepoint.com/sites/")

 

The is a critical function for my app

 

Thanks in advane

 

 

 

 

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (5,118)