I have a SharePoint list with rich text editors to add links. The links are mainly to items within the same SharePoint site. However I think on save only the part of the link after /sites/ gets saved. So when I try to click the links with PowerApps on the View form, it can't find the link (link looks like this: https://us.create.powerapps.com/sites/MySPSite)
I found this Idea about the same topic but wondering if there are any workarounds to handle this? Seems like it would be a fairly common situation
Thanks for the suggestion. Issue is that the links are stored in a rich text field so I won't know how they're going to be formatted or how many links there will be. So I don't think I can just parse out 1-many links especially without knowning where in the field they'll be
The field could look like this (fake links):
User ABC's new request
It could also look like this:
In that case have you considered using an HtmlText control to display your rich text field? That will give you the complete text and the hyperlinks also, regardless of how many they are.
Yes, sorry don't think that was clear but that's what I'm using. The links are there and clickable, it's just that none of the links are valid URLs. They're all stored as a relative link like this: /sites/MySPSite/Library/Doc1.pdf
Those work within SharePoint but not when accessed through the app
With your example you first mentioned I was thinking I could manipulate the link in the HTML control to manually add https://site.sharepoint.com before each link but without knowning what the rich text field will look like not thinking that's possible
@cooper33Ah...I'm picking up what you're putting down now!
So yes, that would be the challenge with relative URL's.
What I would suggest is to perhaps, on your HtmlText property, change it to something like this:
Substitute(yourColumnName, "/sites/MySPSite", "https://site.sharepoint.com/sites/MySPSite")
How do you stop from duplicating the url text?
Although it's a relative url, the display value includes "https://site.sharepoint.com/".
The substitute function makes it "https://site.sharepoint.comhttps://site.sharepoint.com/sites/mysposite".
It doesn't seem possible to substitute the initial "https:".
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights