Run if - I Have Totally Forgotten


Badge +5

Hello ,

I have a very simple and I mean simple workflow that I cannot get to work properly.

The workflow is set to run when a new item is created and when the item is modified.  The Initiator is sent notification of receipt, request is worked and the status is changed to closed, the workflow starts sends notification of completion. That works.....but....if the status is changed to in progress or pending the Initiator is sent notification of receipt again...WHY???

This simple workflow is making me so frustrated.

Thanks - Suzanne

177578_pastedImage_0.png


12 replies

Badge +11

Put a log action in there just before the If action to verify the Status is not set to Closed.

Badge +5

Do you mean the Log in History? I have never used this action.  I will have to pull out the user manual!!

Badge +11

No its easier than you think. All you have to do is log anything so you can see how far it is getting. You can also use variables and fields in it to see their values. The text you create will show up in the workflow history of the item.

Badge +5

Will this stop the Initiator from receiving an acknowledgement of receipt when the status is changed to Cancelled,  In Progress or Pending?

Badge +11

All the Log History action does is just logs. It does not interfere with the other actions.

Badge +5

Thanks - that is not quite what I am looking for.

I want to workflow to:

1.  Send acknowledgement of receipt.

2. Run only again when the status is changed to closed to send notice of completion.

What it is doing now is sending the acknowledgement of receipt when the status is changed to Cancelled, In Progress or Pending even though the Run if action states Closed.  So the initiator is receiving acknowledgement of receipt more than once.

Badge +5

Suzanne, the reason for this is that there is no condition for the Request Received email. Every time the workflow runs that email will be sent regardless of how the workflow got started. One way to resolve this is to check the status before sending the Request Received email. If you don't have an option in your Status field, add a default of Requested so that only new items have that status. You can then change the status to something other than Requested after sending the email and exiting the workflow.

The workflow may run when other activities change status, but only when it is Request or Closed will any emails be sent.

Hope this helps.

Badge +5

I am not sure that will work.  We are not manually sending the Request Received e-mail.

The Acknowledgement of Receipt is sent automatically once the Initiator submits the request.

The Operations Status is set to New.

The team edits the request to In Progress or Pending (for their use only).  The Initiator does not need any notification (but is receiving).

Once the team completes the request, they edit the request to Closed.  The initiator receives notice of Completion.

Badge +5

Suzanne, there are other ways to resolve the problem, but the reason for repeating emails they're receiving is that there is no condition for the Request Received email. Every time the workflow runs that email will be sent regardless of how the workflow got started.

Userlevel 5
Badge +12

Hi Suzanne,

This is easily solved with start Conditions.   Instead of running the workflow every time an item is modified, simply specify the condition on the status (or statuses) that you wish it to start on.  This should solve your issue.  Here is a link that shows the different types of workflow start in addition to conditional.

Starting your Workflow

Thanks

Userlevel 6
Badge +12

Hello -

There are a multitude of ways to handle this and it really depends on what outcome you are looking for and the level of complexity/detail you want to get into.

I think one of the easiest ways is to simply wrap the first notification step in a Run If action and look for a specific status. This does not require you to alter any of the start up options.

Personally, I would either segregate the workflows (create one for new items and one for updated) to keep them clean and make them easier to build upon; or if it has to be in one workflow, add a switch action and evaluate the status field.

Hope this helps!

Userlevel 4
Badge +8

There is a lot of great suggestions in this thread.  But one more thing to consider is use of the "Wait for Item Update" action, instead of the Run If.  So you only start the workflow when the item is created, and after the first notification is sent, the workflow goes to sleep and wakes up only when the status is complete to send the other notification.

This approach may be preferred if every item will get completed in a reasonable amount of time. You want to avoid having workflows that may never complete or would take a very long time to complete (many weeks or months).  So if every item will get completed reasonable quickly, this approach is reasonable may be slightly preferred to having two workflows.   Otherwise, I like Jesse McHargue​'s suggestion of two workflows better... one WF for new items and one for updated items.

Reply