“How would you update the hyperlink SharePoint column type using validateUpdateListItem in Power Automate? Nobody seems to have written about it or they use headers!”
When you need to update only one SharePoint column, the easiest way is to use an HTTP request. A single HTTP request where you define the column name and its value. No matter how many columns the list has, or if there’re mandatory columns, you can update just the one.
The only knowledge you need is the HTTP request and what value to use, which is especially true for complex columns. For this article it’s the hyperlink column.
Use validateUpdateListItem for the update
The action you’re looking for is the ‘Send an HTTP request to SharePoint’ with the same HTTP request as repeated in multiple articles before. Add the action to your flow and configure it as shown below.
Uri: _api/web/lists/GetByTitle('<ListName>')/items(<ItemID>)/validateUpdateListItem
Body:
{
"formValues":[
{
"FieldName": "<FieldToUpdate>",
"FieldValue": "<ValueToUpdate>"
}
]
}
Note: < … > are placeholders, replace them including the < and >!
When updating hyperlink column, the Uri and the FieldName is the same as for the other field types. The difference comes in the ValueToUpdate part. While normally you’d just enter the value, hyperlink column expects two values – the url and the alternative text.
Since there’s only one parameter, the FieldValue, you must put both the informations in that single parameter. Enter the uri first, add a comma, and follow with the alternate text, e.g.
"FieldValue": "https://www.google.com, Link to Google"
And that’s it, the request will take everything before the comma as the uri, and display it as the text behind the comma.
Summary
The SharePoint hyperlink column in one of the more complicated to update in Power Automate via a HTTP request since it has two pieces of information. But you can put both of them in the FieldValue, just separate them with a comma and the HTTP request will take care of the rest.
Or you can use a single line of text column with a JSON formatting instead.
Thank you!
Thanks a lot!
Make sure you include a space after the comma or else it won’t separate the URL and Display Text.