0

I am working on an enterprise wiki site, and I know that when creating a new wiki page it goes through the following life cycle:-

  1. When a user clicks on add new page, and he enters the page title; a new empty wiki page will automatically be created, before adding any content.

  2. After adding the content to the rich text editor and click on save. The page got updated and it will have version number 3!.

The above scenario did not cause any problem to me (or I have to live with the fact that to create a new wiki page it will have version 3 automatically).

But now I created a new List Workflow inside SharePoint designer, and I specify to run the work flow automatically when an item is changed.

The problem i am facing is that when a user creates a new wiki page the workflow will run twice !! so can anyone advice ? Although I specify that the workflow should run when an item is changed.

Regards

1 Answer 1

0

It actually creates the file, then renames it in the first step. I would suggest building in an if statement that prevents it running the first time.

6
  • and what i should add in the if statement ?
    – John John
    Sep 18, 2014 at 16:27
  • Not sure, I would start by investigating values that may be different between the two. If not, you could likely just have a hidden value that is empty in the first run (and then set it) and the second run it has a value (so now you can execute your actions)
    – Aboba
    Sep 18, 2014 at 16:45
  • can i check if the content is empty or not , and if it is empty not to send any emails? could this works ?
    – John John
    Sep 18, 2014 at 16:48
  • but i do not think this will works because i mentioned in my workflow to wait if the "assigned To approvers" is not empty. and when a user creat a new wiki page the "Assigned To Approvers" will be empty !!! but seems an email will be sent..
    – John John
    Sep 18, 2014 at 16:54
  • If you are using a wait statement, and it's not waiting, then either a) it does have a value or b) you didn't set it up right. Try adding the value of that field to the e-mail sent to see if there is something in there by default.
    – Aboba
    Sep 18, 2014 at 17:14

Your Answer

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

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