Power Community

Power Community

Update a Hyperlink Column in SharePoint with Power Automate

Today, I was asked about how to create a lookup to a document or item in a SharePoint form. Sometimes a slightly different solution, using a Hyperlink field can do the trick.

Lookups in SharePoint

So I created a lookup column and then in the SharePoint Details form. This would look like this:

Lookup column in a form

Not too bad!?

But when I click on that lookup I get presented with one of these ugly dialogs from SharePoint 20XX. That is not what we want.

Lookup column showing old form when clicked on

So how do we create a link that gets us directly to the document that I linked to?

Lookups are limited to display simple fields and fields like links to items/documents are not available. So there isn’t much we can do here. Also Calculated columns do not support the links that we are after.

Hyperlinks to the rescue!

Create a Hyperlink field

So first in SharePoint you can create a Hyperlink field.

Create an Hyperlink Column

The big difference of course between a Hyperlink field and a Lookup is that there isn’t a set number of values that you can select from. But in this case that was fine. The lookup was set as part of a flow in Power Automate anyway.

Update Hyperlink field in SharePoint

We will have to use the SharePoint REST API to do the update, to ensure that we have the description of the the Hyperlink available to us.

First, I’ve created my Hyperlink as shown earlier and I called this HTML URL. Then using the Send an HTTP request to SharePoint I’m going to set the Hyper link property.

flow in Power Automate to set a Hyperlink column.

Notice that there is no need to used odata=verbose in the Content-Type header. I see many people defaulting to use this verbose switch, but that just makes the update more complicated.

And with the above flow we can fairly easily update our Hyperlink field.

This post was originally published on this site

- Advertisement -spot_img


Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

July 2024 update of Power Automate for desktop

We are happy to announce that the July 2024 update of Power Automate for desktop (version 2.46) has been...

More Articles Like This

- Advertisement -spot_img