Contact us


How To: Parse IDs from a List Lookup to Retain Your Data

By Rhia Wieclawek on February 25, 2019
Parse IDs in Nintex

Let’s say you have a Nintex form with a List Lookup control and over time the contents of that list changes.  What happens when you view submitted forms after a selection in the List Lookup is deleted from the supporting list?  Spoiler alert: it’s gone from the submitted form as well.

There are many scenarios where this could apply: for example, a form that selects people involved on a project, meeting attendees, RACI charts, and so on.  If that person is removed from the list look up and you go back to view the saved form the deleted employee will no longer display where they were selected.  The same could be said for a product or service in a List Lookup that was removed because it is now obsolete, an office location no longer in use, or any other value that might be removed from your lookup list when no longer required.

So, what if you need to retain this data for your records, but you also need to maintain an up to date list?

The answer lies in a workflow that will parse the IDs from the List Lookup and writes those values to another column.

The Form

First things first, we have to set up the form to capture the values from the List Lookup control. To do so, ensure the control on your form is named. This is a best practice in general and enables you to pull data from a control later.

Nintex Office 365 Form

The Workflow

Here is an overview of the workflow we are going to build:

Nintex Workflow

Let’s Build It

  1. Add the Query XML action and configure it to look at XML Source: Content and use {Current Item: NFFormData}. The XPath query will be /FormVariables/[YourControlNameHere]. Set the Return result as Text, and the Query your first result in to a text variable.  If we were to look at what we just pulled out of the XML, it would look like a bunch of hashtags and semicolons with some numbers interspersed. That’s not super helpful – but we will convert this to what we need. Nintex Query XML
  2. Insert a Regular Expression action and set the String to look at the text variable we created in the previous step, in our case {Variable: txtListLookup}. Set String operation to Split, and the Pattern to ;#. This is telling the workflow that every item between those characters is an item for the collection. Finally, create a collection variable for your Output.Nintex Regular Expression
  3. Create a For Each action and only set two items within it – your Input dictionary or collection will be the collection variable from the previous step, and then create a new text Output value. In this example, we have named ours idList because when the workflow runs, it will be full of IDs.Nintex For Each
  4. Inside of the For Each action, add a Run If action. We will to tell it to run When our idList variable is not empty. This keeps the workflow from erroring if blank values are pulled.Nintex Run If
  5. Write the value to a variable using the Set Workflow Variable action. We created a Variable called txtName since our List Lookup is employee names. Use the List Lookup functionality to match the ID to whatever Value you are trying to return. In our case, we are looking for the Title from our list: EmployeeListTest. The filter is “When ID equals Workflow Variable idList”. It will match to whatever the current ID is in the loop and write the associated Title to the variable.Nintex Set Workflow Variable
  6. Finally, use a Build String action to compound each variable into one. This will take the item from the previous loop ({txtNames}), and add it next to the current one ({txtName}).
    Note: this is only required if the Lookup in your form is set to multi-select.Nintex Build String

You will now have turned your IDs (i.e., #;4#;#5#;) into actual text (Name1; Name2). Write this to a list column to retain it forever, whether the values are removed from your lookup list or not!


Have more questions? Elantis is the leader in Digital Transformation and offers Business Process Automation, Business Intelligence and Enterprise Content Management services.  Reach out to Elantis’ Nintex certified experts today.

The Author

Rhia Wieclawek - Elantis Business Process Automation Practice DirectorRhia Wieclawek – Director, Business Process Automation

Rhia is a Business Process Automation expert and one of the few Nintex virtual Technology Evangelists (vTE) in the world. Her experience defining, implementing, and enhancing processes, governance, and Information Architecture has garnered industry recognition.  Rhia has spoken at industry events throughout Canada and the United States.


Nintex 2019 Partner Awards Winner
object(WP_Term)#2095 (16) { ["term_id"]=> int(3) ["name"]=> string(13) "Our Practices" ["slug"]=> string(13) "our-practices" ["term_group"]=> int(0) ["term_taxonomy_id"]=> int(3) ["taxonomy"]=> string(8) "category" ["description"]=> string(0) "" ["parent"]=> int(0) ["count"]=> int(12) ["filter"]=> string(3) "raw" ["cat_ID"]=> int(3) ["category_count"]=> int(12) ["category_description"]=> string(0) "" ["cat_name"]=> string(13) "Our Practices" ["category_nicename"]=> string(13) "our-practices" ["category_parent"]=> int(0) } Our Practices|July 14, 2019

Elantis Wins 2019 Nintex Partner Award for Customer Success

Elantis Solutions Inc. is pleased to announce it has been named a winner in the 2019 Nintex Partner Awards within the Customer Success category. Elantis was recognized for their proven ability to accelerate business outcomes and results using the Nintex Process Platform.

object(WP_Term)#2085 (16) { ["term_id"]=> int(3) ["name"]=> string(13) "Our Practices" ["slug"]=> string(13) "our-practices" ["term_group"]=> int(0) ["term_taxonomy_id"]=> int(3) ["taxonomy"]=> string(8) "category" ["description"]=> string(0) "" ["parent"]=> int(0) ["count"]=> int(12) ["filter"]=> string(3) "raw" ["cat_ID"]=> int(3) ["category_count"]=> int(12) ["category_description"]=> string(0) "" ["cat_name"]=> string(13) "Our Practices" ["category_nicename"]=> string(13) "our-practices" ["category_parent"]=> int(0) } Our Practices|June 19, 2019

Ten Promapp Best Practices you Need to Implement Now

If you’re using Promapp, it’s probably already improved your efficiency and reduced your costs. Here are some tips to really maximize the benefits and keep users engaged in process improvements.

2019 Nintex Partner Awards Finalist
object(WP_Term)#2084 (16) { ["term_id"]=> int(6) ["name"]=> string(8) "Our Work" ["slug"]=> string(8) "our-work" ["term_group"]=> int(0) ["term_taxonomy_id"]=> int(6) ["taxonomy"]=> string(8) "category" ["description"]=> string(0) "" ["parent"]=> int(0) ["count"]=> int(15) ["filter"]=> string(3) "raw" ["cat_ID"]=> int(6) ["category_count"]=> int(15) ["category_description"]=> string(0) "" ["cat_name"]=> string(8) "Our Work" ["category_nicename"]=> string(8) "our-work" ["category_parent"]=> int(0) } Our Work|June 14, 2019

Elantis Named Finalist in the 2019 Nintex Partner Awards

EDMONTON, AB June 14th — ELANTIS, a provider of Business Process Automation, Enterprise Content Management, and Business Intelligence, announced they are a finalist in the 2019 Nintex Solution Awards in two categories.