0

In the last days on SP online I am having a very strange issue: I have cerated 2 SPD workflows, one to be run at new item, the other at item change:

At new item At item change

But when I create a new item, both are fired. I tried to re-create and check all possible issues; also I have deactivate the "Automatically update the workflows status..." option despite - as far as I know - these changes should not trigger the on-change workflows. At the end this is what I get: enter image description here

That is all on-new or on-change workflows are triggered at item creation. Did anybody encounter similar issue?

Thanks

4
  • I don't have SP Online, but your question made me wonder whether you could modify your 'on-change' workflow to run an additional check. Maybe something like IF (Modified Date) is greater than (Modified Date) -> run workflow. Perhaps that would prevent it firing off when the item is created?
    – Tally
    May 2, 2018 at 13:40
  • workflows do not run on conditions, they run on create or change items (or manually) - even if with a http call we can workaround this limit - but this is not the case
    – Marpio
    May 3, 2018 at 15:04
  • "workflows do not run on conditions, they run on create or change items (or manually)" - yes I know that. But if you edit the conditions WITHIN the workflow you can prevent it from sending the email. So, to be clear, the workflow will be triggered, but once it is running it will see the condition e.g. IF (Modified Date) is greater than (Modified Date) -> stop the workflow.
    – Tally
    May 3, 2018 at 15:11
  • I see the point, but my workflow get triggered also if totally empty.... there must be something wrong behind the list itself, because I set up an empty workflow on both new and change and they are both triggered at any new item!
    – Marpio
    May 4, 2018 at 8:27

2 Answers 2

0

What may be cause is that your item after its creation is being updated (that you are not aware of). And only then, your second WF is being triggered.
If you activate or already have versioning, you will probably see that there are more than 1 version already crated on item creation. Hence, your Wf that is triggered on item update is activated and executed.

One of solutions is to add additional stage at the beginning of update WF and to put some expression so your update WF won't go through all stages but instead will jump to exit.

2
  • Thank you for your suggestion, but the versioning should not trigger a change workflow (and as far as I know ANY change done by a workflow is triggering it). Here I think there is something wrong with MS. Even if my "new" workflow is just doing nothing, the "change" workflow gets triggered...
    – Marpio
    May 3, 2018 at 14:52
  • no no, you didn't understand me about versioning. I just mentioned them because in versions you will see that there are more than 1 version after item is created, Workflow that works on item creation will edit your item and create new version after that your second workflow that works on item update will be triggered, hence you get both workflows activated.
    – Danilo
    May 3, 2018 at 15:33
0

Since I have found no answer to fix this issue, I have used a workaround. Maybe this may be useful to those who will encounter a similar issue.

  1. Added a new yes/no column in my list (new-completed) and set on "no" the default value
  2. Set the value of new-completed on "yes" at the end of "new" workflow
  3. Set a condition at the beginning of the "change" workflow: if new-completed not equal "yes", go to the end of workflow - else go ahead.

If I had to wait MS to help, I could wait for months and no solution. This may be a little primitive, but it works!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.