0

I have a list which users are able to submit new contacts to, but these contacts need approval before they can be accessed by everyone.

In order to achieve this, I went to :

List -> List Settings -> Versioning Settings :

enter image description here

As you can see, I selected No for Create a version each time you edit an item in this list?, however whenever a list item is edited on this list (after being created and then approved), it goes back to being in a Pending state and requires further approval.

This then causes an infinite chain reaction where, if an item is approved after an edit, this approval counts as editing the item and so the document goes back into Pending state.

Is there a way of preventing this? Ie I would like to require approval on Create but not on Edit, and I also need another workflow which I created to run each time an item is edited.

3 Answers 3

1

You can check if condition for the approval block with the workflow status hidden field.

  • Create on hidden column called IsApproved & give default value as No
  • At the time of new item creation inside the approval block, Update the IsApproved field as Yes
  • In the workflow check if IsApproved equal to false then go to approval Please refer the below image

enter image description here

Or else you dont want to trigger the workflow for edit list item at all. You can uncheck the Start workflow automatically when the item is Changed in the Start Options of workflow settings.

5
  • Hi Mohamed, many thanks for your answer. This doesn't quite do what I need, because when editing an item, the actual Approval status will still be set to Pending, even if my custom edit workflow does not perform the actions I would need for an Approved item. I need a workflow to run on each edit, but no requirement for approval at edit.
    – Bassie
    Commented May 11, 2016 at 9:59
  • Your welcome. What your saying is after the task is approved the status is not changing? Commented May 11, 2016 at 10:06
  • It does change for a second, but then after I refresh it gets set back to Pending. I think this is because approving an item counts as an edit, because the Approval Status column is being amended. I only want new items to require approval.
    – Bassie
    Commented May 11, 2016 at 10:35
  • In simple way you can have 2 workflows 1 for create new item and another one for Edit item. Commented May 11, 2016 at 12:03
  • This does not behave correctly when used in conjunction with the built in Approval option, as creating an item seems to set off the changed item workflow (see sharepoint.stackexchange.com/questions/179339/…). I could just do all of the approving via custom workflows, but then what is the point of sharepoint?? PS SharePoint sucks
    – Bassie
    Commented May 11, 2016 at 12:13
1

How about creating a column, maybe call it newWF as a (single line of text) and set to default value to Yes.

in your wf, check the value of that column, if it is equal yes(meaning it is a new item), run your logic, but dont forget to set the column to No after you finish.

if the value is no do nothing or skip.

not the most elegant solution, but it works!

enter image description here

2
  • Hi Ahmed, thanks for your answer. I actually need another workflow to run when an item is edited - just not the appraval. I don't know how I can access the actual Approval workflow, as it is built in SharePoint 2013
    – Bassie
    Commented May 11, 2016 at 11:02
  • You can create another workflow and attach it to the library that runs when the item is changed! Also, since it is a SP 2013, you can start a wf within a workflow...I am updating the screen shots in my answer above! Commented May 11, 2016 at 14:01
1

at least for my situation I found a workaround. It consists in applying an action at the very end of my status change workflow of ¨set content approval¨ and I just assign approved. This makes my list item to automatically go back to approved again when somebedy changes the status of the ticket.

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.