Run workflow when a specific field changes but no other field

  • 14 April 2020
  • 7 replies
  • 35 views

Badge +2
Hi Everyone,
 
Just want to get confirmation on my workflow that runs conditionally. It's a simple workflow and based on forum posts. It runs on a specific content type for a ticket list that has an Approval Status choice field with "Pending", "Approved", and "Rejected" as the choices. The default is set to "Pending". The workflow should send a notification to IT when the field is changed to either Approved or Rejected. I do not want the workflow to kick off unless the Approval Status has changed. I set the workflow to start on Modified, with Condition set to "Approval Status (previous value) is not equal to Approval Status", and Compare is checked. In the workflow I have a Switch action, with Approve and Reject as the values. For each value, I have a Send Notification action with a different message in the body.
 
Is that all I need to do? Again, I want to be sure the workflow should *only* run when the Approval Status field changes. Lots of other fields are going to be updated throughout the life of the ticket, and I do not want to have this workflow kick off when these other fields change.
 
Thanks,
Joan

7 replies

Userlevel 5
Badge +13

Anytime someone edits the item and it meets that criteria the workflow will run. You may need to add another field that is changed as the first action, so when the workflow is triggered so it will not retrigger.

Badge +2

Leigh,

I don't understand "add another field that is changed as the first action".

Joan

Userlevel 5
Badge +13

You may need to add another field to the criteria, such as a checkbox being No. Then when the workflow triggers you change that checkbox to Yes as the first action, this will would stop additional changes from the users retriggering the workflow.

Badge +2

Leigh,

I thought the Conditional Startup with Compare to field (https://community.nintex.com/t5/Nintex-for-SharePoint/Email-notification-value-change/td-p/69610) made it unnecessary to add an additional field such as what you describe.

Joan

Userlevel 5
Badge +13

@jresnickehrlich Sorry about that I missed where you were using the compare to field option. Yes this should work without the additional option.

Badge +2

Leigh,

ok, thanks.

Joan

Badge +2

Leigh,

The workflow runs ok when it is supposed to - meaning, only when the ApprovalStatus clumn is changed. But multiple (5) emails are sent instead of just one email. Here is how I have workflow set up:

 

Workflow Settings: Run on Modified, Condition = ApprovalStatus (previous) is not equal to ApprovalStatus. Compare to filed is checked.

 

Workflow actions:

Switch action. Values are Approved and Rejected.

Approved: Parallel action > Send Notification to Support. Send Notification to Requester.

Rejected: Parallel action > Send Notification to Support. Send Notification to Requester.

 

That's it. I am only sending emails.

 

I ran one test, setting ApprovalStatus column to Approved. I can see in Workflow history details that the proper Switch (Approved) ran. I can see it ran 5 times during the same minute. Support got 5 emails all the same. Requester got 5 emails all the same.

 

Do need an End Workflow action? Do I need a Commit Pending Changes at the end (before the red stop)? I am not updating any fields in the workflow itself, the ApprovalStatus field gets updated in item itself by the Approver.

 

Thanks,

Joan

Reply