In this article, I will show how to set an Initiation Form for a Designer Workflow.
What is Initiation Form?
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.
Association Form is another type of form which is used to capture information before associating with a list. Association forms are created for Reusable Workflows. In our case we are using List Workflow & directly associating the workflow with a list & thus the Association Form is not scoped.
We can use Initiation Forms on List Workflows which have different parameters for execution on each item. For example, in an Expense approval scenario we can set different Max-Limit parameters for each list items.
We are creating an Expense Approval Workflow. The flow is simple:
- If expense amount is <= Max-Limit, then set Status = Approved
- If 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 different list items where the Max-Limit is different.
Create a new list named Expense with following columns.
Open SharePoint Designer & Create a new List Workflow selecting the above Expense list.
Click the Initiation Form Parameters button.
You will get the following dialog.
We are going to create the parameter named Max-Limit. Click the Add button & Create the Parameter of type Number.
Click the Next button & You can set the Default value too.
Click the Finish button & then Ok button to close the dialog. You are ready with the Parameter.
Open the Designer of Workflow & Create 2 if branches like below.
I have used the following condition:
and the following action:
You can choose the Max-Limit parameter from the Lookup dialog.
Save Changes & Publish the workflow.
Now you can see that a new InfoPath form is created for us.
We can test the workflow now. Open your list & Create a new Item.
After creating the item, use the context menu and open the Workflows item.
In the appearing page you can see the Expense Approval workflow.
Click to run the workflow & you will get the following Initiation Form.
Enter the value & click the Start button to execute the workflow.
You can see the item being updated using the Initialization Parameter.
In this article we have explored how to use Initiation Parameter.