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

Update item on Sharepoint List replacing Display text to full URL

I'm new to power automate.  I am working on a flow to, whenever an item is edited and certain triggers are met, it changes the ready for routing from yes to no, and updates a couple fields.  

Now, the minutae are fairly unimportant, but whenever I enter the link to the project in that field so that it does not change, the flow replaces the link text (for example "Project Folder" hyperlink that is connected to the url), with the full URL.  Any idea why this is happening? In the dynamic content there appears to be only the one option for that field.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @JKDaubn ,

To change the URL text without losing the URL, You need to use REST API Action of Power Automate- "Send an HTTP Request to SharePoint".


Here is an example:

URLFIeld.PNG

What you should change:

  • _api/web/lists/getbytitle('<List Name>')/items(<item ID>)
  • {
    "__metadata": {
    "type": "<Type>"   {To get the type browse to the URL https://<sharepoint server or tenant>/<site collection>/<subsite>/_api/web/lists/getbytitle('<listname>')/Items(<id>) and search for SP.DATA },


    "<URL Column Name>":
    {
    "__metadata": {
    "type": "SP.FieldUrlValue"
    },
    "Description":"<Text>",
    "Url":"<URL>"

    }
    }

     

    ——————————————————
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

     

     

 

 

 

View solution in original post

9 REPLIES 9
DeepakS
Super User
Super User

Hi @JKDaubn ,

 

Could you please share a screen capture of your Power Automate. it might be an expression fix. 

JKDaubn
Frequent Visitor

tempsnip.png

 Here you go. Is this the info you need?

Hi @JKDaubn ,

To change the URL text without losing the URL, You need to use REST API Action of Power Automate- "Send an HTTP Request to SharePoint".


Here is an example:

URLFIeld.PNG

What you should change:

  • _api/web/lists/getbytitle('<List Name>')/items(<item ID>)
  • {
    "__metadata": {
    "type": "<Type>"   {To get the type browse to the URL https://<sharepoint server or tenant>/<site collection>/<subsite>/_api/web/lists/getbytitle('<listname>')/Items(<id>) and search for SP.DATA },


    "<URL Column Name>":
    {
    "__metadata": {
    "type": "SP.FieldUrlValue"
    },
    "Description":"<Text>",
    "Url":"<URL>"

    }
    }

     

    ——————————————————
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

     

     

 

 

 

View solution in original post

JKDaubn
Frequent Visitor

Sorry, dumb question, what is the ID of a column?  The title doesn't appear to be fetching the SP.Data I need

Hi @JKDaubn , if  you can share the output of : 

 

https://<sharepoint server or tenant>/<site collection>/<subsite>/_api/web/lists/getbytitle('<listname>')/Items(<id>)

 

I will let you know what exactly you need.

 

——————————————————
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

JKDaubn
Frequent Visitor

Capture.PNG

 

Project Routing is the name of the list and "route project to" is the name of the column with the data.  I've switched gears and am using an HTTP request to clear a person field, but I still need the SP.Data for the column. Or something. I'm learning as I go.

Hi @JKDaubn,
you should use actual item ID (SharePoint ID column, it’s a number) .
For example if Iteam ID is 123 - iteams(123)
JKDaubn
Frequent Visitor

Can you point to the location on a sample list?  I'm having a hard time understanding.

Hi @JKDaubn  i highlighted the ID column that you should use .

tempsnip.png

 

——————————————————
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,920)