.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Initiation Form for Workflow in SharePoint

Posted By:Jean Paul       Posted Date: August 30, 2014    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

In this article, I will show how to set an Initiation Form for a Designer Workflow in SharePoint.
 

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.

Example Scenario

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.

image

Scenario

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

  1. If expense amount is <= Max-Limit, then set Status = Approved
  2. 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.

Step 1

Create a new list named Expense with following columns.

image

Step 2

Open SharePoint Designer & Create a new List Workflow selecting the above Expense list.

image

Step 3

Click the Initiation Form Parameters button.

image

You will get the following dialog.

image

We are going to create the parameter named Max-Limit.  Click the Add button & Create the Parameter of type Number.

image

Click the Next button & You can set the Default value too.

image

Click the Finish button & then Ok button to close the dialog.  You are ready with the Parameter.

Step 4

Open the Designer of Workflow & Create 2 if branches like below.

image

I have used the following condition:

image 

and the following action:

image

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

image

Step 5

Save Changes & Publish the workflow.

image

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

image

Step 6

We can test the workflow now.  Open your list & Create a new Item.

image

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

image

In the appearing page you can see the Expense Approval workflow.

image

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

image

Enter the value & click the Start button to execute the workflow.

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

image

References

http://bit.ly/1cOtHZi

Summary

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


 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend