Anda di halaman 1dari 4

Using InfoPath for Custom Task Forms in SharePoint 2010 Workflows

Why Use an InfoPath Form? InfoPath is used to generate data entry forms for both the acquisition of information as well as storage of that information. With the 2010 release, InfoPath can now be used as an alternate way to present SharePoint 2010 content within the web browser, thus enhancing the overall user experience. Using forms with workflows can help manage and enforce business processes throughout an organization. In SharePoint 2010, the interface for interacting with these lists is done through forms. Therefore, you may use InfoPath 2010 to customize these forms and enhance the user experience. The main storage within SharePoint is done through lists. Whether it is a document library, announcements, project status, or so on, they are all types of lists. SharePoint enables users to interact with lists for entering items, viewing items, or modifying items. This is all done through the web browser based on the structure of the list. Because each form submitted may contain different selections or entered fields, a workflow can look at the InfoPath form entries and perform actions based on those entries. InfoPath forms provide a centralized location for the information being acted upon. Getting Started To get started using InfoPath 2010, you need Microsoft Office Professional Plus 2010. Installing Microsoft Office Professional Plus 2010 allows you to choose InfoPath as one of the applications that gets installed. Once installed, your Windows Programs menu will include two links under the Microsoft Office folder: Microsoft InfoPath Designer 2010 and Microsoft InfoPath Filler 2010. We will use Microsoft InfoPath Designer 2010 as that instance of InfoPath 2010 is the one which you use to design and create form templates. The Microsoft InfoPath Filler 2010 instance is the local instance of InfoPath which can be used to fill out forms that are not rendered through SharePoint (or a web browser). For most, installing InfoPath 2010 locally on your computer will provide you the necessary means of accomplishing the tasks covered in this tutorial. However, when developing code-behind that references the SharePoint assemblies, InfoPath 2010 must be installed in a SharePoint environment such as a virtual machine. InfoPath Designer 2010 Basics The first step to create SharePoint forms is to open InfoPath Designer. From there, you have a number of options. When designing a new form, you have various template options: We will design an InfoPath Form Using the Blank Form Template. You want to create a new form for user input to be used in SharePoint. When you open InfoPath Designer 2010, you are automatically taken to the File, New page, as shown in Figure 1.1. On the New

page either double-click the Blank Form or select the Blank Form button, and click the Design Form button to create a new blank form.

Figure 1.1 To design a simple form, follow these steps: 1. Click the Click to Add Title text that appears and enter a title for the form. 2. Click in the bottom section of the form where it states Add Tables. 3. Click the Insert ribbon bar menu and select the Two-Column 4 table in the Tables section. This is a layout table that assists in aligning the labels and controls on your form. 4. Click the File menu and select Save. 5. Enter a name for the form file and click OK. This will save a local copy of the form. We now have a base form to which we can start adding controls, as shown in Figure 1.2.

Figure 1.2 Entering a title and adding a layout table to a form produces a base form. Now, to add Controls use the Controls section from the Home top ribbon bar. To add controls to your form, follow these steps: 1. Click the first Add Control cell in the layout table of the form. 2. From the Home ribbon bar, locate the Controls section, as shown in Figure 1.3, and click Text Box.

Figure 1.3

3. Click the Add label in the cell to the left of the text box and enter a label for this entry. This is to tell the user what information to enter into the text box. 4. Repeat these steps for the remaining rows in the layout table. Your form should look similar to Figure 1.4

Figure 1.4 5. Click Save from the File menu to save your changes locally. 6. Press the F5 key to view a Preview of your form. Your form will render in the InfoPath Filler version of the application, and you can view how it works there.

Anda mungkin juga menyukai