cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted

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.

Highlighted
Frequent Visitor

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

Highlighted

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

Highlighted
Frequent Visitor

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...

 

Highlighted

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.

Highlighted
Community Support
Community Support

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.
Highlighted
Advocate III
Advocate III

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?

Highlighted
Kudo Kingpin
Kudo Kingpin

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' }

Highlighted
Frequent Visitor

Re: Replace URL as a string/link

Hi Brentless

 

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

 

Highlighted
Frequent Visitor

Re: Replace URL as a string/link

Managed to resolve this, here is my screenshot:

 

 

 

 

 

Highlighted
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 Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!
Highlighted
Resolver II
Resolver II

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

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Users online (5,379)