cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lisa4404
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

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.

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

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

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

 

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.

v-xida-msft
Community Support
Community Support

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

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?

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

Hi Brentless

 

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

 

Managed to resolve this, here is my screenshot:

 

 

 

 

 

GabrielStJohn
Community Champion
Community Champion

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
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager



@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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,305)