2

I have an interesting requirement. How do I prevent Approve-Reject-Reassign Dialog box from showing when I need to approve a file. Instead, I have a different criterion for determining the document's approval. If the check-in comments does not contain the word "Reject", then the request is considered approved.

If check-in comment contains "Reject" then send Rejection email to document author and stop workflow. Otherwise, create task and send notify to next approver. I am using SharePoint Designer 2010.

1

You can do this SharePoint Designer. I assume you have SPD Approval workflow set on your item.

Start Approval process on Current Item with Head

Click on Approval

then Change Behaviour of Single Task

then under When a task completes

Modify this step to store check in comment.

you can read Current tasks comments using this action

Set Variable: vCheckinComment to [%Current Task:Comments%]

use below action in Main Worklfow.

If Variable: vCheckinComment contains Reject

Set content approval status to Rejected with Variable: CompletionReason

Else

vCheckinComment does not contains Reject

Set content approval status to Approved with Variable: CompletionReason

Please find my revised reply.

You dont need this much Complexity but rather follow below steps.

Go to main Workflow.

Start Collect Signature Workflow task process with Parameter:Signers

Then below that

Set Variable: vCheckinComment to Current Item:Check In Comment

Then Below that use below action in Main Worklfow.

If Variable: vCheckinComment contains Reject

Set content approval status to Rejected with Variable: CompletionReason

Else

vCheckinComment does not contains Reject

Set content approval status to Approved with Variable: CompletionReason

So, Your Workflow will look like.

Start Collect Signature Workflow task process with Parameter:Signers

Set Variable: vCheckinComment to Current Item:Check In Comment

If Variable: vCheckinComment contains Reject

Set content approval status to Rejected with Variable: CompletionReason

Else

vCheckinComment does not contains Reject

Set content approval status to Approved with Variable: CompletionReason

Note: I don't have Collect Signature workflow enabled,but the steps should be the same. Mine steps are for Approval Workflow. Let me know, if you are not clear.

  • Do you mean add it to the "When the Item Is Changed" step within "When the Task Process Is Running" Step in Overall Tasks? Just want to clarify where the Main Workflow is. – TheDotNetDJ Nov 10 '14 at 8:46
  • No, Do you have Approval Workflow defined in SPD? – Devang Zala Nov 10 '14 at 8:49
  • Click Workflows in Navigation under SPD. Then click on your Workflow name. Then Click on Edit Workflow- this is your main workflow. in other words, where you have written your Approval Process Action- is your main workflow. – Devang Zala Nov 10 '14 at 8:51
  • Yes, I do. I have a reusable workflow "rwf_Routing". – TheDotNetDJ Nov 10 '14 at 8:53
  • O I C. In the Notification Engine Step. I'll let you know how it goes. It is difficult to know where to add custom code because there are 3 different behaviors. I am a VS.NET user but can't use for this project. – TheDotNetDJ Nov 10 '14 at 9:03

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.