How to: Update SharePoint hyperlink field the proper way with alternative text - Power Automate
Intro
By default it is possible as user to set an alternative text for your hyperlink fields in the SharePoint user interface. But how do you set an alternative text with Power Automate?
The default "Update item" or "Update file properties" action only allows you to set the URL itself.
Solution
You can set and update the SharePoint hyperlink field with the desired alternative text through the REST API of SharePoint. With this one action you can update the hyperlink field (and other fields while you are at it).
Create the action called "Send an HTTP request to SharePoint" in your Power Automate flow or Logic app.
In the following examples, the field is called "Hyperlinkfield". You should replace this with the internal name of your field.
Update SharePoint hyperlink field using the list GUID
Update multiple SharePoint fields using the list GUID
Update SharePoint hyperlink field using the list title
Copy the code
URI - Update using the list GUID
_api/web/lists(guid'<List GUID>')/items('<item id>')
URI - Update using the list title
_api/web/lists/GetByTitle('<List title>')/items('<item id>')
Header
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json",
"If-Match": "*",
"X-HTTP-Method": "MERGE"
}
Body
{
"Hyperlinkfield": {
"Url": "https://www.dhirubhai.net/in/jeremylevoye/",
"Description": "My LinkedIn page"
}
}
The results
senior service engineer for medical devices at FUJIFILM
1 个月Thank you!