Update Hyperlink and description using Flow HTTP request

Brass Contributor

I have library where Documents can replace another document.

What I want to do is to choose which document that should be replaced and I do this with a lookup in the form when createng the document.

 

The problem is that documents can be archived and moved to another library and then the lookup column will be empty on the new document.

 

The solution is to use a flow that when a document is created and replaces another document I will create a hyperlink to the document selected in the lookup field.

The problem is that I can not set both URL and description in Flow.

 

I guess I have to use a HTTP request but I dont know how to do it.

 

So, I need to set a hyperlinkfield on a document with a link and description to another document using flow.

3 Replies

@36048419 
You would need a post request similar to the one shown underneath.
Whereby the type as well as the field value may differ in our case (blue outlines).

Micca0815_0-1599489036214.png

to not to crawl the REST references you might want to use the following URL in a browser and adjust the bold characters according to your list (last one is an item id).

https://SITEURL/_api/web/lists/getbytitle('LISTTITLE')/items(1

The returned XML should include everything you need:

Micca0815_1-1599489916756.png

The more properly defined syntax for the call  than mine can be found at this c-sharpcorner blog post.

@Micca0815 

 

Thank you and sorry for the late rely, I will test this.

I entered the URL but got this back

This XML file does not appear to have any style information associated with it. The document tree is shown below.
#
<m:code>-2130575338, System.ArgumentException</m:code>
<m:message xml:lang="en-US">Item does not exist. It may have been deleted by another user.</m:message>
</m:error>#
 
This is for the start page of the site.
 
If I use the site where the library is located I just get "not found " the in browser.