In this article, we will create a simple approval workflow in which approver is selected dynamically from another list using Sharepoint Designer 2013. We will implement the following approver hierarchy:

approver hierarchy SharePoint 2013 Approval Workflow With Dynamic Approvers From Another List

In a document library, if User1 or User2 creates any document then it will be approved by Manager1. Similarly, Administrator will approve documents created by Manager1 and Manager2.

Video:

Here is the full video tutorial:

Creating Approver List:

To define the approver for the user, we create a list.

Click “Settings” icon > Add an app > Custom List
Enter Name “Approver Info” > click Create

Open “Approver Info” list
In Top Ribbon List > List Settings
Click “Title” in Columns and rename to Department > OK
Click “Create Column” and enter following information
Name: “Editor
Type: “Person or Group
Require that this column contains information: Yes
Allow multiple selections: No
Allow selection of: People Only
Choose from: All Users

Similarly create “Approver” column and enter data.

approver SharePoint 2013 Approval Workflow With Dynamic Approvers From Another List

Creating Workflow:

1. Open Document Library > In Library Ribbon: Workflow Settings > Click “Create a Workflow in Sharepoint Designer”
2. Click “Allow”, It will open Sharepoint designer, Enter Name “Approval Workflow” and description > OK

workflow name SharePoint 2013 Approval Workflow With Dynamic Approvers From Another List

3. In Workflow Ribbon > Action > “Set Workflow Status” > Enter “Pending”
4. just below of this action, add new action “Set Workflow Variable
click “Workflow Variable” > “Create a new variable” > Set Name “Approver” and Type “String“.
click value > click function icon > set following values:

Find Data to Retrieve:
Data source: Approver Info
Field from source: Approver
Return field as: Login Name

Find the List Item
Field: Editor
Value: click function icon > select Datasource : Current Item, Field from source: Created By, Return field as “Login Name”

workflow approver SharePoint 2013 Approval Workflow With Dynamic Approvers From Another List

5. just below of this action, add new action > “Start a task process
Click “these users“, click … for participants
Select “Workflow Lookup for a User” > Add
Select Data Source “Workflow Variables and Parameters“, Field from source : Variable :Approver, Return field as: String > OK
OK
Enter Task Title and Description
click OK

workflow task SharePoint 2013 Approval Workflow With Dynamic Approvers From Another List

6. After this action, click Condition > “if any value equals value
click first value, click function icon
Data source: “Workflow Variables and Parameters”
Field from source : Variable : Outcome

click second value, select approved

7. In If condition, Add action “Set Workflow Status” > Enter “Approved”
8. In workflow ribbon > click “Else Branch”, Add action “Set Workflow Status” > Enter “Rejected”
9. below of “Transition to stage”

Add Action > “Go to a stage”
click “a stage” > select “End of Workflow”

Save it. Now the workflow looks like below:

workflow complete SharePoint 2013 Approval Workflow With Dynamic Approvers From Another List

10. Click on “Workflow Settings” in ribbon and check “Start workflow automatically when an item is created” in Start options.
11. Publish the workflow.

Filtering Task List:

Now user wants to see their tasks only. So In the view, to display the tasks of the current user only:

Open Task library > List ribbon > List Settings
Click “All Tasks” in Views

In filter section, select “Show items only when the following is true:” and set condition “Assigned to is equal to [Me].

task filter SharePoint 2013 Approval Workflow With Dynamic Approvers From Another List

When user1 creates any document, A task is assigned to Manager1. When Manager1 approves the request then the status will become approved.

Conclusion:

We have implemented a very simple Sharepoint designer 2013 workflow where approver is defined by another custom Sharepoint list.

Enjoy Sharepoint !!

Comments:  4

  • http://devtools.korzh.com/ devtools.korzh.com

    Thank you. It was that, what i need.

  • Ali

    good post! can i use workflow plat form type sharepoint 2010 for this ?

  • gih.nih

    if user1 upload a document and its waiting to approve, then user2 can see that document in document lib. (just see not open) ?

  • Mohamed Amor

    hi i’m trying to do something similar to my sharepoint site just want to know how to link it with the column name in my docs base “Departement”