Skip to main content

For additonal actions within the workflow I need to know the URL of the current library. We have a lot of different libraries but the build is not unique. Sometimes the library URL is "website/lists/library_name" in other cases only "website/library_name"

The url for the documents libraries is "website/library_name"

The url for the lists is "website/lists/list_name"

Hope this helps


Hello Caroline,

unfortunally your answer was to easy and wrong. In my case I have the following situation:

Website URL = http://rad.eworkplace.xxx.com/training

Library name = Dokumente

Library URL = http://rad.eworkplace.xxx.com/training/lists/ewdocuments

You see, your solution gives not the right answer


Which version of SharePoint do you have ?


It is SharePoint 2013 and Nintex Workflow 2013 STD


Just to be sure, can you confirm that this list is a document Library and not a list by sending a screenshot of the site content page where we can see the logo next to the name of the list ?


Library settings.JPGScreenshot Library.JPG


To get the url of the document Library or list, you can execute the following REST API query (by using a web request action in your workflow) :

Site_url/_api/web/lists/getbytitle('Dokumente')/RootFolder

You can then extract the result by using a query xml action and the following XPath query :

//*[local-name()='ServerRelativeUrl']

Hope this helps


Hi,

my problem is nearly solved. I have still one open issue.

I need the absolute address of the library. In my case the Nintex variable "Web_url" ends with the name of the subwebsite "Training" and the ServerRelativUrl starts again with the Websitename "Training".

How can I get in any easy, but flexible way to receive the absolute URL?


Maybe the simplest way is to create a workflow constant with the url of the server.

If you have multiple environment, you just have to change the value of this constant and keep the same name.


Hello Caroline,

I used your web request, but instead the fixed name "Dokumente", I used the Nintex attribute "listname".

It works well as long as I deselected all additional languages. In this case the orginal listname= Documents and the web request give the correct URL back.

When I activate the german language, the listname=Dokumente and then the web request failed.

Do you have any idea how I can solve that issue?


You have this error when using the Nintex attribute "listname" and with a new instance of the workflow once you've activated the german language ?


Yes,

with the german language activiated the Nintex attribute "listname" hase the value "Dokumente" and with that the web request failed


if you re publish the workflow, does it work ?


I pubished the workflow without activating the german language and then it works fine. As soon a activate the german language without republishing the workflows, the Nintex attribute "listname" is changed to "Dokumente" and the workflow fails.

Also republishing with activated german language does not work.


if you execute the query in your browser, do you have an error ?

If you paste the following url in Chrome, which display name for your list is displayed ?

Site_url/_api/web/lists


The query with "documents" is successful, with "Dokumente" returns the error "Die Liste 'Dokumente' ist in der Website mit der URL .... nicht vorhanden.

The URL Site_URL/_API/web/listsĀ  gives a full screen with XML data back, but a attribute "Display name" is not available


I'm afraid I can't help you. I haven't done this before and I don't know what could be the reason of this behaviour.


Hello Caroline,

never the less, thanks a lot. I learnt a lot about the web request and get information about lists.

I am afraid it could be another bug in Nintex Workflow 2013 International edition. In another case, I learnt to create and publish the workflow in the installation language (in our case english) and later on the workflow works also with the other installed language. In this case the Nintex attribute "listname" is the display name while the workflow instance is running and not the base listname.

ThanksĀ  again


I'm glad that I've been able to help you


Hi,

I believe, I have solved my problem. I changed the web request from "getbytitle" to "getbyID". This is language independend a gives me also the URL back.


Yes, it is a workaround. Be careful, if you have several environment (development, production), to change the list ID as it can be different depending an your deployment method.


Reply