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” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/”>
<soap:Body>
<GetListItems xmlns=”http://schemas.microsoft.com/sharepoint/soap/”>
<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>)

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.