Vadim Tabakman

Jump to bottom

Nintex Workflow - What Changed UDA

This has been a blog post that has been in the making for quite some time.  I just haven't had the time to do everything I wanted with it and actually sit down and write about it.  Even now, I'm swamped, so the text in this post will be limited.  I do have a video that you'll find below, that goes through what this does, how it does it, and why you'd want it.

The aim here, was to build some logic that would let me know, in a Nintex Workflow, what fields have changed and what their before and after values are.

VIDEO

You do have other options that what I'm talking about.  You could keep another list fields that stores the before values and then when your workflow runs, it could compare to the current values.

The way I've done this, is via two User Defined Actions (UDAs).

1. Initial Change Token UDA (this is used in a workflow that would run when an item is created.

2. Get Modified Fields UDA (this is used in a workflow that is set up to run when an item is modified).

REQUIREMENT : You need to create a field in your (hidden preferably).  This will store a bunch of XML throughout this process.

Also, the UDAs make webs service calls, where I'm using a Nintex Workflow constant.  You'll need to tweak those to use your constant.

Core Concepts

Basically, the UDAs here work, because they use the awesome web service, Lists.asmx.  Thank you Microsoft.  It exposes a lot of functionality that we can use here.

The three web methods that you have a choice of, are GetListItemChange, GetListItemChangeSinceToken and GetListItemChangeWithKnowledge.

I use the GetListItemChangesSinceToken, and am using the Query XML action to pull the information I need out of the XLM data.  I also store the XML in the ChangeXML field I have in my list.  Ideally, I'd just store the token, but I had plans in the future of doing some other things with the data, so I kept the entire XML.

Design - Initial Change Token UDA

I couldn't fit the entire design screenshots into this post.  But you're free to download the UDAs and the workflows at the bottom of this post.

Design - Get Modified Fields UDA

I may add some more here later, but for now, all the information is in the video and also in the files you can download below.

Downloads

Nintex Workflow 2013

Download the Initial Change Token UDA (NWF) - Download and import into the User Defined Action designer page

Download the Initial Workflow - Download and import into the Workflow Designer page

Download the Get Modified Fields UDA (NWF)  - Download and import into the User Defined Action designer page

Download the Modified Workflow  - Download and import into the Workflow Designer page

Copyright Vadim Tabakman
Rate this Content 0 Votes

Comments

Friday, March 27, 2015 2:38:12 PM
Brett Barkman
Gravatar

re: Nintex Workflow - What Changed UDA

Hello Vadim,

I tried to import the user defined actions and received the message, "The selected file does not appear to be a valid export file.  Please select a .uda file."

Regards,

Brett Barkman
(long time listener, first time caller)

Friday, March 27, 2015 2:39:49 PM

re: Nintex Workflow - What Changed UDA

Hi Brett,

Go to Manage User Defined actions, click on Create.  This will bring up the designer page.

Now click on the Import button on the ribbon and import the downloaded file.

cheers,

Vadim

Friday, March 27, 2015 2:42:44 PM

re: Nintex Workflow - What Changed UDA

perfect.  thanks.

Monday, May 4, 2015 2:25:23 PM
Dejan Dujak
Gravatar

re: Is video different then UDA and NWF

Hi,

Very good article by the way. I am trying to implement this Nintex feature but having some issues with UDA & NWF. It seems that video on this page and content of UDA & NWF is different then download content. Am I missing something? Please help.

Thank you in advance.

Dejan.

Thursday, May 28, 2015 4:39:55 PM
Ray
Gravatar

re: Nintex Workflow - What Changed UDA

Hi Vadim,

 

I am trying the approach you laid out but running into an issue when I modify an item to initiate the "Modified Workflow".  Here is what the message in the workflow report says... 

 

Failed to invoke web service. Reference to undeclared entity 'nbsp'. Line 28, position 901

Failed to run User Defined Action. Reference to undeclared entity 'nbsp'. Line 28, position 901.

An error has occurred in WhatChanged Modified Workflow.

 

I then checked the Get Modified Fields UDA and it seems to be different than what you show in the video and screenshots.  It is missing the two beginning "Get List Information..." web service and the "Extract List ID" steps...  Please advise!

 

Thanks

Ray

 

 

 

Thursday, May 28, 2015 4:49:32 PM
Ray
Gravatar

re: Nintex Workflow - What Changed UDA

Hi Vadim,

RE:Nintex Workflow - What Changed UDA

I am trying the approach you laid out but running into an issue when I modify an item to initiate the "Modified Workflow".  Here is what the message in the workflow report says... 


Failed to invoke web service. Reference to undeclared entity 'nbsp'. Line 28, position 901
Failed to run User Defined Action. Reference to undeclared entity 'nbsp'. Line 28, position 901.
An error has occurred in WhatChanged Modified Workflow.


I then checked the Get Modified Fields UDA and it seems to be different than what you show in the video and screenshots.  It is missing the two beginning "Get List Information..." web service and the "Extract List ID" steps...  Please advise!


Thanks

Ray

Wednesday, July 8, 2015 10:29:08 AM
Dejan Dujak
Gravatar

Get Modified Fields UDA section?

 Hi Wadim,

I am trying to integrate this UDA into my Workflow. Unfortunetly something is still missing.  In Get Modified Fields UDA section "Pull out the Number of Items changed since Last Time" UDA will not go further. DO I have older version of this UDA. Can you please send me latest version. This is great piece of Nintex WF. I really needs this one.

Thank you in advance.

 

Dejan Dujak

Wednesday, July 8, 2015 10:59:01 AM

re: Nintex Workflow - What Changed UDA

Hi Dejan,

file attached to this is the latest.  Can you put some log actions into the UDA, publish it and republish your workflow and run it and see how far into the UDA it goes?

cheers,

Vadim

Wednesday, July 8, 2015 11:11:17 AM

re: Nintex Workflow - What Changed UDA

Hi Vadim,

 

I put log actions after every Nintex Action in UDA.  UDA will not go further then "Pull out the Number of Items changed since Last Time". That is last section before Condition in UDA for Onchange staff. Initial Workflow is activating just fine and ChangeXML value is also set correctly. For some reason (100% my mistake) OnChange staff will not show modified fields. Any chance you can help me.

Thursday, July 9, 2015 9:57:29 AM

re: Nintex Workflow - What Changed UDA

Hi DejanNL,

it sounds like the query is not getting any data back, as the Count is not working.  I don't know why this wouldn't work.

You could do some more debugging to track down which action is not doing what we expect it to.

cheers,

Vadim

Friday, January 13, 2017 9:10:44 AM

re: Nintex Workflow - What Changed UDA

Hi Vadim,

could you please tell me how to send information about what has changed via E-Mail?

A comparison list would be great because I would have to send a great amount of information as my list consist of 30 different values.

Another thing is I don't want to force the recipients to enter SharePoint in order to see what has changed

As I am a greenhorn in using SharePoint & Nintex it is not easy for me to solve out how to do this.

I tried it this way without success:

Inside of the "For each" loop of the "WhatChanged Modified Workflow" I tried to fill three further collections with values for being used in a sendmail operation after the loop but there is no information in the E-Mail that arrives.

Is this the wrong way?

Any help is much appreciated...

Best Regards,
Dirk

You must sign in to this site to post comments.
Already Registered?
Sign In
Not Yet Registered?
Register
  • RSS





 

Statistics

  • Entries (235)
  • Comments (1721)

Categories