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

Replace URL as a string/link

Hi,

 

we want to replace the URL in a SharePoint List as a string/link.

We generated a link column in SharePoint which get filled by a flow-workflow with the URL to a SharePoint document libary e.g. "https://sharepoint/documents/test". The workflow works but in the column the whole URL is displayed. Is there an opportunity to replace the long URL for exampl with an expression?

 

Many thanks!

Lisa

12 REPLIES 12
Super User
Super User

Re: Replace URL as a string/link

Hi @Lisa4404,

 

You can use expressions like substring and split and all sorts of others. When you add dynamic contents in the expressions tab you will find that if you start typing the fucntions available will be presented to you. It's not restricted to the list of expressions shown in the default list.

Lisa4404
Level: Powered On

Re: Replace URL as a string/link

Hi @Pieter_Veenstra,

 

thanks for your reply.

The flow to generate the URL with dynamic content works. The problem is that the URL is written in the SharePoint column and we want to have a link. In SharePoint you can decide between the URL and the Display Text. We want to adapt the Display Text of the Link.

 

Kind regards

Lisa

Super User
Super User

Re: Replace URL as a string/link

That means that you need to update the URL field and include the display text of the URL. 

 

you can do wthis with 

 

<UrL>, <Description>

 

make sure that there is a space after the comma

Lisa4404
Level: Powered On

Re: Replace URL as a string/link

I took the workflow action 'update element in SharePoint'. In the link-field I generate a URL. When I added the description like this

1.png

 

the result is

2.png

 

but the result should be

3.png

 

Or do you use another flow action to generate the link?

Hope it's comprehensible...

 

Super User
Super User

Re: Replace URL as a string/link

I think this doesn't work at the moment.

 

I just created an item with a url field called hyper. Then I ran the following Flow which first gets hyper field of the item and then updates the item and the description is removed.

 

SetURL.PNG

 

I also tried manually updating the URL variable with the "url, description" and I got the same result as you.

Community Support Team
Community Support Team

Re: Replace URL as a string/link

Hi @Lisa4404,

 

Could you please share a screenshot of your flow's configuration?

Do you want convert the URL into a Display text string/link within the Hyperlink column of your SharePoint list or library using Microsoft Flow?

 

I agree with @Pieter_Veenstra's thought almost, I afraid that there is no way to achieve your needs in Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
bdc604
Level 8

Re: Replace URL as a string/link

Has anyone had any luck leveraging REST API in a Flow: HTTP or Flow: Send an HTTP Request to Sharepoint to achieve the link/display issue for hyperlinks?

Brentless
Level 8

Re: Replace URL as a string/link

Replying to older thread, but I have done this successfully on several use cases.

 

The update part of the code for the hyperlink field is as follows:

 

'HyperlinkFieldNameHere':  {'__metadata': { 'type': 'SP.FieldUrlValue' },'Description': 'Link Name Here','Url': 'http://www.whatever.com' }

LeonAIL
Level: Powered On

Re: Replace URL as a string/link

Hi Brentless

 

Please could you attach a screenshot of your rest call for Update the hyperlink?

 

LeonAIL
Level: Powered On

Re: Replace URL as a string/link

Managed to resolve this, here is my screenshot:

 

 

 

 

 

Administrator
Administrator

Re: Replace URL as a string/link

Hello, @Lisa4404!

 

Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply @LeonAIL‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!


Thank you for being an active member of the Flow Community!

 

-Gabriel
Flow Community Manager

-Gabriel
Microsoft Flow Community Manager

Re: Replace URL as a string/link

@Lisa4404 ,

 

If you're still trying to set up the REST API, check out the blog post below for a walk through:

 

https://www.dmcinfo.com/latest-thinking/blog/id/9832/creating-sharepoint-list-items-in-microsoft-flo...

 

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 542 members 4,569 guests
Please welcome our newest community members: