Solved

Find Document URL

  • 18 October 2022
  • 9 replies
  • 357 views

Badge +3

Hello!

I am creating a workflow to send email reminders for document that haven't been updated for a while. I am querying the library to find old documents, then using a "loop for each" to look at each one.

I want the reminder email to include a link to the document, but I can't see how to get the file's URL. Most of the files are in folders, so I can't just append the file name to the library URL.

Does anyone know how to do this, please?

icon

Best answer by Gavin-Adams 19 October 2022, 00:20

View original

9 replies

Userlevel 4
Badge +12

Hi @Mark_U ,


Wow that's harder than it looks.


I was thinking initially the query list action and then possibly a retrieve item action inside a loop to get more details. But the path, URL, or encodedabsoluteURL properties are not returned in the object for libraries.


 


Get a file action does not help as it only returns a file object.


 


I think you will need to use the 'Call a SharePoint web service' action and contruct a query to retrieve the list item by it's ID.


If you have a look at the help page: SharePoint Online - Call a SharePoint web service (nintex.com)


Then see the example on that page to call and item and extract a property that should get you started.


Apologies I don't have time this morning to mock up a working example.


 


I think there is also a feature request here to get Nintex to expand the SharePoint online actions to create 'query a library' action and return more details about the files in a library. If you take a look at the check out files action you can see that the conditions also include an option to navigate subfolders. So that logic should be included in the action too.


The fact that you have to call a webservice just to get the path of a document in a sharepoint online library is crazy.

Badge +3

Hi Gavin! 


Thanks for your reply.


I did think of using a web service, but it seemed like a nuclear-powered sledgehammer for such a small nut. However, if there's no better option...


I might be able to move the files out of folders, which would allow me to bypass the issue by using the file name.


I'll report back here on which solution I end up using. Also, I'll put in a feature request.


Mark

Badge +6

Hi.


I used the instruction in the link provided by Gavin and they worked with some modifications.


I had to use the following path: 


https://SharePoint URL path/_api/web/lists('List ID')/Items(Item ID)/FieldValuesAsText

and in the Query JSON step, the JSONPath expression is: ['d']['FileRef']


 


Hope this helps.


Ed



 

Badge +3
Thanks! I'll check that out.
Badge +3

An extra question: how do we make feature requests now?


I followed the Product Feedback link from Customer Central, but the Nintex UserVoice site has been deactivated.


https://nintex.uservoice.com/ 

Badge +6

Hi.


I think it's ideas.nintex.com.  There's a link in the lower left of this page for "More Resources" / "Product Feature Request"

Badge +3

I've got the web service working. It's fairly easy to set up, even if total overkill. I will make a feature request.
Thank you both @Gavin-Adams and @ethurber for your advice.

Badge +3

Product Feature Request: https://ideas.nintex.com/ideas/IDEA-I-5863 

Userlevel 4
Badge +12

Hi Everyone,


Rick just changed the status of this idea to 'Open for voting'


Please give it a vote if you would like to see it.


 


Cheers,
Gavin

Reply