Initiation Form For Workflow

What an Initiation Form is

An Initiation Form is required to capture user input before starting the workflow.

For SharePoint Designer Workflows, we can use the Initiation Form Parameters screen to automatically create Initiation Forms in InfoPath.

Scenario

We are creating an Expense Approval Workflow. The flow is simple:

  1. If an expense amount is <= Max-Limit, then set Status = Approved
  2. If an expense amount is > Max-Limit then set Status = Not-Approved

Please note that here we are creating a Max-Limit parameter that will be captured on each workflow start. This makes the workflow reusable for various lists and scenarios.

Step 1: Create a new list named "Expense" with the following columns.

Create a new list

Step 2: Open SharePoint Designer and create a new List Workflow selecting the preceding Expense list.

SharePoint Designer

Step 3: Click the "Initiation Form Parameters" Button.

Initiation Form Parameters

You will get the following dialog.

Dialog Box

We will create the parameter named "Max-Limit". Click the "Add" button and create the parameter of type Number.

Create Parameter

Click the "Next" button and you can set the Default value too.

Next button

Click the "Finish" button and then the "Ok" button to close the dialog. You are ready with the parameter.

Step 4: Open the Designer of Workflow and create 2 if branches as in the following.

Open the Designer of Workflow

I have used the following condition:

condition

and the following action:

action

You can choose the "Max-Limit" parameter from the "Lookup" dialog.

Max-Limit Parameter

Step 5: Save the changes and publish the workflow.

Publish the workflow

Now you can see that a new InfoPath form is created for us.

Creating new form

Step 6: We can test the workflow now. Open your list and create a new Item.

Create a new Item

After creating the item, use the context menu and open the "Workflows" item.

open the Workflows item

In the page that appears you can see the Expense Approval workflow.

Expense Approval workflow

Click to run the workflow and you will get the following "Initiation Form".

Initiation Form

Enter the value and click the "Start" button to execute the workflow.

Updated using the Initialization Parameter

You can see the item being updated using the Initialization Parameter.

References

http://bit.ly/1cOtHZi

Summary

In this article we have explored how to use an Initiation Parameter.

Up Next
    Ebook Download
    View all
    Learn
    View all