Conditional WF utilizing "Compare to Fields"


Badge +1

Hello!  I am utilizing SharePoint 2013.  I have a Nintex form (List A) with fields/columns to capture data for Workman Comp claims.  This is sensitive data, therefore I have created a workflow (WF A) to write selected fields (that contain non-sensitive data) over to a second list (List B) for directors to review.  This works great.  However, there are times when certain fields in List A are modified by HR - and these changes need to be reflected in List B.  So I created a second workflow (WF B) with a conditional start that utilizes the ‘Compare to Field”.  The Conditional Startup Options start when items are modified and field (previous values) do not equal field.  This is working wonderfully – however, now the directors want to know what specific fields were changed.  I do not see “field (previous value)” available to reference.  Can you please point me in the right direction to accomplish this?  Any help would be greatly appreciated.  


4 replies

Badge +16

would it not just be a case of turning on version history on list B?  you will see what changed when and by who?

Badge +1

Hi Cassy, Thank you for your reply.  Yes, I do have versioning turned on for list B.  However, they want to know what fields changed via the wf email so they do not have to go hunting for the information and then have to disperse this info among all team members.  

Badge +1

@SimonMuntz - Do you have any ideas?  You were an amazing help to me last time!  :-)

Badge +8

Hi,

I don´t think it is easily possible to access this information (as in "give me the last value of field x").

There is however the GetVersionCollection web Service located under {WebUrl}/_vti_bin/Lists.asmx

This Web Service can give you the Versioning of a specific field of a specific item in a list. You could then compare the second-latest version with the current value and if they don´t match notify about this field.

 

But if you just have a handful of fields, I´d suggest to keep a copy of the latest value in a hidden column in List B and check against this field.

  1. An Item in List B detects change in field "Country"
  2. The workflow starts because of this change
  3. The workflow looks at the Column "Country_Old" and compares it to "Country". If a change has been detected, notify someone (or collect a list of changed fields)
  4. The workflow updates "Country_Old" to the new value in "Country"

Do steps 3 & 4 for your handful of columns

 

Reply