1

So I have a workflow on a list, I need to have versioning set and to hide drafts so I nned to have content approval on on the list but I also require a workflow to ensure that the information put in is correct and then approved. The issue is SharePoint creates an approval status column. My work flow I attach creates a approval column also.

So my solution was to have the workflow, once complete change the other approval column. I can get this to happen by using;-

If Current Item:Approval Status equals 2;#Pending
Start Approval (3) process on Current Item with myusername
Set content approval status to Approved with

Problem is if the list item is rejected then it is still approved in the approval column. So I tried;-

If Current Item:Approval Status equals 2;#Pending
Start Approval (3) process on Current Item with Myusername
Set content approval status to Approved with
If Variable: IsItemApproved equals Approved
Set content approval status to Approved with 
Else
If Variable: IsItemApproved equals Rejected
Delete item in Current Item

Can someone point me in the right direction.

0

I found my own answer.

Basically you need to ignore the 2nd part of the code, the workflow simply needs to be

If Current Item:Approval Status equals 2;#Pending
Start Approval (3) process on Current Item with myusername
Stop the workflow and log WorkflowComplete

Notice the Approval (3) this is actually a workflow within a workflow if that makes sense.

You need to double click "Approval (3)"

Then under Cutomisation click change the behavious of a single task.

Then scroll down to the header "when a task completes"

In there you need to edit it to say;-

If Current Task:Outcome equals Approved
Log Task assigned to [%Current Task:Assig... to the workflow history list
Set content approval status to Approved with comments
Else
If Current Task:Outcome equals Rejected
Log Task assigned to [%Current Task:Assig... to the workflow history list
Delete item in Current Item
If Variable: CancelonRejection equals Yes
Set Variable: CompletionReason to [%Task Process:Process Name%] on [%Ta...
    End Task Process

Essentially that will if the task is approved it will add it to the list and allow it to be seen and if it is rejected then it will delete the current item.

  • 1
    I can't until tomorrow – user3271150 Aug 17 '16 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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