Skip to main content
Nintex Community Menu Bar

Hi,

 

I want to update a field (OP_ID) with a site workflow, if this field is empty. The field should have the value "OP4__List ID]", but I don't know how to select the List ID in the Action "Update multiple items".

 

26800i8A6C917266AED08C.png

Because you're using a site workflow, I'd imagine most List info would be missing from the References tab because there is no List to reference!



 



However, getting the List ID of a SharePoint List is trivial with a Call Web Service Action. 



 



Let's say that I have a new Site called:



"Sandbox_2"



 



that contains a List called:



"Sandbox 2 - Test List 1".



 



In a Site Workflow I would make two variables:





 



Then all I would need is a new Call Web Service Action, configured thusly:





(note: I am using an environmental constant called "rootURL" which just contains the root of my site followed by an ending "/". You should configure your url to whatever it actually is! an example URL using the test Site I made would look something like: http://YourSharePointSite/sites/RootSite/Sandbox_2/_vti_bin/Lists.asmx) 



 



After that's been setup, all you need to do is add a Query XML Action to process the XML returned from the Request:





 



Here is the XPath form that can be copied:



//*[name()='List']/@ID

 



(note: I could not get the xpath of //List/@ID to work for some reason. I do not know if it's because of the amount of XML that is returned with these sorts of request or what, but doing it this way seems to work reliably!)



 



This will result in the listID workflow variable being populated with:





 



If I were to go to the Library Settings of the List in Question I can confirm if this is correct:





 



It is!



 



I hope that this helps you to produce the information you were looking for.



 


Reply