scrawford
Forms Fledgling

Start workflow when items are modified (except if updated by other workflow)

Jump to solution

I currently have a workflow that generates tasks and then updates information in the underlying list item according to what the users enter in the task forms.

 

Separate to that process, I want to create a new workflow or edit the Nintex List Item form somehow that will trigger a notification of who changed what to all teams when someone edits the underlying list item.  I also want that trigger to exclude any updates made automatically by the other running workflow.  Is that possible?

 

0 Kudos
Reply
5 Replies
Tarf
Design Canvas Artiste

Re: Start workflow when items are modified (except if updated by other workflow)

Jump to solution

You could try adding a hidden field (like a yes/no) to your list which triggers if a notificiation is sent or not. (Let´s call it "suppressNotification")

Configure the workflow to start when items are modified

First action: Run if suppressNotification is true:

Set suppressNotification to false then End Workflow

 

You could then update the list via workflow and set suppressNotification to true.

0 Kudos
Reply
scrawford
Forms Fledgling

Re: Start workflow when items are modified (except if updated by other workflow)

Jump to solution

Hi Tarf,

 

That's a good idea.  Thank you.  However, I have found during my testing that a different workflow updating fields doesn't trigger the workflow to run when it's set to start when fields are modified, so it's all good.  Hopefully that won't change in the production list I use.

0 Kudos
Reply
Tarf
Design Canvas Artiste

Re: Start workflow when items are modified (except if updated by other workflow)

Jump to solution

Hi Scrawford,

 

usually conditional workflows should run when an element is updated via workflow, except you run the workflow as system account (the name in SP may be displayed as "System Account" - I don´t recall the correct name for the user).

Any event based workflows (when created, when modified) will not be executed when changes are done by this user.

I don´t think it is recommended to run your workflows as system account.

See: https://community.nintex.com/t5/Nintex-for-SharePoint/Workflow-not-starting-automatically-as-System-...

 

0 Kudos
Reply
scrawford
Forms Fledgling

Re: Start workflow when items are modified (except if updated by other workflow)

Jump to solution

Hi @Tarf ,

 

I have found that you're correct.  The notification workflow is triggered by my other workflow.  I tried your suggestion with the SuppressNotification field to be set to "Yes" before any changes are made in the workflow.

 

However, the problem arises when changes are made inside flexi-tasks (when I put the data on the form and the user changes it).  I can't set SuppressNotification to "Yes" before the flexi-task because if the user doesn't answer the flexi-task for a day and in-between that time another user has modified the overarching list item, the flag is still set to "Yes" so it won't trigger the notification workflow.   Know what I mean?

 

I just want to only run the notification workflow when the list item is changed outside of the workflow, so I was wondering if there's some way I can trigger the workflow form the list item's Nintex form only?  Like have a hidden field or code in the form that sets SuppressNotification to "Yes" and set it back in the notification workflow.  Is that possible?

 

*I'm using a responsive form though (which I understand doesn't have code capability (and all my other forms are responsive too so I don't want to have change all of them). 

0 Kudos
Reply
Tarf
Design Canvas Artiste

Re: Start workflow when items are modified (except if updated by other workflow)

Jump to solution

Hi @scrawford,

maybe in your scenario it would be easier to not suppress but to "allow" notifications?

What I mean is:

  • Have a Workflow which runs on item change, if a field (lets call it "sendNotification", type: Single Line of Text) is set to "true"
    • set "sendNotification" to "false" and send out notification
  • In your Nintex Form, connect the "Save" Button to the "sendNotification" Field (in Advanced section). Value: "true" (because we are using the save button, the field has to be single line of text, buttons can´t connect to yes no fields)

This way, changes made in the form will send out notifications (or changes when "sendNotification" is set to true, you could also update the field in the workflow to send out notifications), but changes done in task-forms, via workflow etc. will not.

Hope this helps.

View solution in original post

Reply