Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

InfoPath with Sharepoint 2010 : Expose Form Fields as Web Part Connection Parameters & Create a Form to Send Data to Web Parts

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
2/6/2012 3:40:51 PM

Expose Form Fields as Web Part Connection Parameters


There are many opportunities to promote fields as parameters during publishing of the form or creating a “send data to web part” rule action. However, at any time, you may promote fields as web parameters using the form options:

1.
From File, Info, click the Form Options button, as shown in Figure 1, to access the form settings.

Figure 1. Clicking Form Options allows you to access the form settings.

2.
Select the Property Promotion category in the Form Options dialog.

3.
Click Add in the bottom section and select a field from your form, as shown in Figure 2, to use the field as a web part parameter. Select the parameter type and click OK to create the web part parameter.

Figure 2. Selecting a field allows you to create the web part parameter.


4.
All the fields listed in the box will be available for web part usage, as shown in Figure 3. Click OK to save the changes.



Figure 3. Clicking OK allows all fields listed to be used as web part parameters.


Create a Form to Send Data to Web Parts


With the InfoPath Form web part, you may create forms that are used solely for input purposes and submit the entered data as parameters to other web parts on the page. A simple example of this is using a form to filter items displayed in a list.

First let’s create the form:

1.
Create a new form with a date picker control and a button. Name the date field DateSelection and change the button label to Apply. Because this is for a web part, resize the form as shown in Figure 4.

Figure 4. Resizing the form prepares it for web part usage.

2.
From File, Info, click the Form Options button.

3.
Select the Property Promotion category in the Form Options dialog.

4.
Click Add in the bottom section and select the Date field from your form. Select Output as the parameter type and click OK to create the web part parameter.

5.
Click OK in the Form Options dialog.

6.
Select the Apply button and on the ribbon bar select Add Rule, When This Button Is Clicked, Submit Data, as shown in Figure 5, to create a new button rule. The Rule Details dialog appears.

Figure 5. Clicking Add Rule creates a new button rule.

7.
In the Rule Details dialog, change the Action to Send Data to Web Part, as shown in Figure 6, such that the rule sends the parameters to a connected web part.

Figure 6. Changing the action allows the button to send data to a connected web part.


8.
Optionally, click the Property Promotion button to ensure the Date Selection field is being promoted as a SharePoint web part parameter.

9.
Click OK.

10.
Publish the form to a SharePoint library or as a content type. If using a content type, add it to an existing form library.

Now let’s create the page:

1.
Create a new web part page in your SharePoint site. Use a template that has a left column.

2.
Add an InfoPath Form web part to the Left Column zone and configure it to use the form you created in the previous steps.

3.
Add a List View web part to the Body zone of the page by selecting a form library.

4.
From the InfoPath Form Web Part item menu, select Connections, Send Data To, List Name, as shown in Figure 7, to create a web part connection between the web parts. The Choose Connection dialog appears.

Figure 7. Sending data to the list web part creates a web part connection.

5.
We are using the connection as a filter, so in the Choose Connection dialog, click the Configure button.

6.
Select the Date column from the list web part in the Consumer Field Name, as shown in Figure 8, to send the Date Selection as a filter to that field.



Figure 8. Selecting the consumer field determines the column that is to be filtered.


7.
Click Finish.

8.
On the Page ribbon bar, click the Stop Editing button.

9.
Enter a date into the form and click Apply. The list shows only (filters) the items with a due date of the entered date, as shown in Figure 9.



Figure 9. Entering a date and clicking Apply filters the list.

Other -----------------
- Windows Server 2003 : Creating Virtual Machines (part 2) - Configuring Virtual Machines
- Windows Server 2003 : Creating Virtual Machines (part 1) - Initial Configuration of a Virtual Machine
- Windows Home Server 2011 : Sharing Videos
- Microsoft Dynamics AX 2009 : Processing Business Tasks - Creating company-specific document layout
- Microsoft Dynamics AX 2009 : Processing Business Tasks - Posting sales orders
- Active Directory Domain Services 2008 : Add a Computer to a Group
- Active Directory Domain Services 2008 : Move a Computer Object
- Windows Server 2008 Server Core : Starting and Configuring the Registry Editor (part 2)
- Windows Server 2008 Server Core : Starting and Configuring the Registry Editor (part 1)
- Microsoft BizTalk 2010 : Consuming ASDK-based Adapters - Installation
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
 
programming4us
Natural Miscarriage
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Game Trailer