How to update multi-value lookup field using Nintex?

Steps to update multi-value lookup field using Nintex 

  • Using the Call web service and Query XML actions you can retrieve the value of the multi-lookup field, already in the form which it needs to be for an update.
  • This will give the value like this #2;#India;#5;#China which you then can then append with other lookup values in the form of #(item ID)#(value) before updating the multi value lookup column (For example #2;#India;#5;#China;#<Lookup Item ID>;#<Look up Item Value>)
  • Update the multi-lookup column using update item action

The call web service method to use is GetListItems (http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx). The SOAP for the same as follows:

<?xml version=”1.0″ encoding=”utf-8″?>
<soap:Envelope xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/”&gt;
<soap:Body>
<GetListItems xmlns=”http://schemas.microsoft.com/sharepoint/soap/”&gt;
<listName>Main List</listName>
<viewName></viewName>
<query>
<Query>
<Where>
<Eq>
<FieldRef Name=”ID” />
<Value Type=”Counter”>{ItemProperty:ID}</Value>
</Eq>
</Where>
</Query>
</query>
<viewFields>
<ViewFields>
<FieldRef Name=”Key_x0020_Word_x0020_Selected” />
</ViewFields>
</viewFields>
<rowLimit></rowLimit>
<queryOptions>
<QueryOptions/>
</queryOptions>
<webID></webID>
</GetListItems>
</soap:Body>
</soap:Envelope>

Where ‘Key_x0020_Word_x0020_Selected’ is the field name of my multi-value lookup field.

Then using the workflow variable where the result was stored I configured my query XML action as follows:

 

This will give the value like this #2;#India;#5;#China which you then can then append with other lookup values in the form of #(item ID)#(value) before updating the multi value lookup column (For example #2;#India;#5;#China;#<Lookup Item ID>;#<Look up Item Value>)

 

Advertisements

About Joseph Velliah
As a SharePoint Developer my professional interests tend to be technical and SharePoint focused. I run a blog at "SP RIDER" where you can expect to read HOW TOs and scenarios that I run into during my day to day job. I hope my posts will give back a little to the community that is helped me.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: