How To: Leverage Your Nintex (XML) Form Data

I get this question a lot and there are a lot of articles out there around this topic, but I wanted to clarify a few things. What is this used for? Why would I use it? Just how easy it? So let’s jump in!

Nintex (XML) Data, What Is It Used For and How Can I Use It?

The Form Data variable within Nintex Workflow (on prem, O365 it is call NFFormData) is used for unbound data in your Nintex forms. This means that any controls you are using in your forms that are not connected back to a SharePoint list column will be here. That’s great, but why would I need use this? There are many use cases on why we would want to use this everything from accessing repeating section data to not wanting to commit the data back to SharePoint. We will use the example of not wanting to commit the data back to SharePoint in this discussion.

Collecting Data without Commiting to a SharePoint Column

The idea of not commiting data back to a SharePoint list is more common than most people realize. For various reasons, we want to collect the data in an easy, user friendly format (Nintex forms to the rescue!), but do not want to create a SharePoint column for every data point. We still want to access the collected data within the workflow though so it needs to be accessible. This is where it all comes together with the Form Data variable in the workflow! So how easy is it to start using it? You probably already have access to it without realizing!

The Ease of Form Data

First and foremost, you need to be using Nintex forms to see this variable. If you are just using the out of the box SharePoint form, you will not see it in the workflow tool. Once you create a form you will see it in the Item Properties tab:

Left: No Nintex Form Data | Right: Nintex Form Data

So let’s take a look at the Nintex form. Below is a sample I put together and have 3 controls that are not connected to a list column:

Nintex Form with unbound controls
Advertisements

Now, let’s say we want to access the data within the workflow to update other systems or create SQL queries using the data points. Within the workflow we can query the Form Data variable (since it is XML) and target each node. So taking a look at the XML of the above form, here is how easily we can setup the workflow action:

<?xml version="1.0" encoding="utf-8"?>
<FormVariables>
	<Version />
	<Project_x0020_Number type="System.String">A113</Project_x0020_Number>
	<User_x0020_Name type="System.String">jesse_mchargue</User_x0020_Name>
	<Internal_x0020_ID_x0020_Number type="System.Int32">8675309</Internal_x0020_ID_x0020_Number>
</FormVariables>

Query XML workflow action:

Query XML Action

All we need to do is target the node we want and store it in a variable. We can then use the variables how ever we want. If you need some help building the XPath to target the node, check out the XPath Builder button in the workflow action (onprem) or here is a free online XPath tester

Here are the results for our example:

Extracted Data: 
Project Number: A113
User Name: jesse_mchargue
Internal ID: 8675309

Is it that easy?

Yes, it is that easy! Keep in mind that Form Data is only available when you have a Nintex form and you want to access the unbound data in your workflows. Of course, if it is bound to a list column, you can query the list. 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

%d bloggers like this: