Archive | InfoPath RSS feed for this section

Cascading Drop-Down using InfoPath 2010


How to  setup cascading Drop-Down List in SharePoint 2010 using InfoPath 2010? Excellent article by Nguyen Ba Quang with detail steps by steps
instructions can be found at : Cascading Drop-Down List in SharePoint 2010 using InfoPath 2010

InfoPath Form 2010 Switching views after submit‎


How to redirect users to a certain page after they have filled out a browser enabled form with InfoPath  2010 to SharePoint 2010 form library?

InfoPath 2010 Form Redirect Users

Scenario:  You designed a InfoPath 2010 form and published to SharePoint 2010 library.  When user submit the form you don’t want them to see the document library which contain all the submitted form. 
How to redirect users to a different page in InfoPath form 2010?
 

Submit InfoPath 2010 Form

1. Copy your InfoPath 2010 form URL:

Redirect InfoPath Form 2010 Users

Go where it says Source= and remove everything to &DefaultItemOpen=1

image

 

Add your URL which you want your users to go after submitting InfoPath Form 2010.  In this case, after user submit the form, they will be redirected to HR Page.

image

Creating form in InfoPath 2010 and publishing to SharePoint 2010


How to create a simple form using InfoPath 2010 and publish to SharePoint 2010 so that it can be filled using web browser?

In this post, I am going to create a simple form using InfoPath 2010 and publish the form to a SharePoint 2010 library and open the form using Web Browser

 

1. Open InfoPath 2010 Designer and Click on File | New | Select Blank Form | Click on Design Form

Creating Blank Form in InfoPath 2010

2.  Blank Form Template in InfoPath 2010 is created. Now I want to insert tables

Blank Form template in InfoPath 2010

3. Click on Insert tab and select the table format which you want

Insert Table in InfoPath 2010

4. Adding control to InfoPath 2010 Forms
To add controls to your form, click on HOME tab and go where it says Controls

image

5. If you want to add InfoPath form 2010 controls similar to InfoPath form 2007, just click on the control pane

Control  Pane in InfoPath 2010

6. Now your control pane is will look like InfoPath 2007 format.

InfoPath 2010 Control similar to InfoPath 2007

7. Let’s go and add controls to our new InfoPath 2010 forms. 
I added four input text fields. To go to properties of the filed, just double click and name the properties

Adding Controls to InfoPath 2010 Form

Properties of the Fields in InfoPath 2010 forms

InfoPath 2010 Fileds Properties

8.  Now the form is ready and let’s go and publish this to SharePoint 2010 Form library.
      Data | Form Options

Form Submit Options in InfoPath 2010

9. InfoPath 2010 Submit Form Options:

If you want to submit the form to SharePoint Document Library, put a check in Allow users to Submit this form
Other options are “Show the submit button in both the ribbon and the info tab in the InfoPath filter

image

10. If your satisfy with all the all the options, click Ok. This will give you a message saying “ You must select a data connection for Submitting data to a SharePoint document library. To create a new data connection, click ADD”

Let’s go and click Add to create new data connection to SharePoint 2010 Document Library

image

11.  Data Connection Wizard: This wizard helps you to specify a data connection for submitting the form to a document library on SharePoint site. The form will be submitted with the file name specified below
I already have created a Form Library in SharePoint 2010.  If you don’t have the link for the Form Library go to your SharePoint site and create a Form Library.

In File Name, I selected as name and the form will be submitted with the file name specified below

InfoPath 2010 Data Connection Wizard

To insert File Name : Click on Fx Icon

Insert Filed or Group in InfoPath Form 2010

12. Enter a name for this data connection and click on Finish and Ok for next Window

Name for Data Connection in InfoPath 2010

13.  Now the data connection to document library is completed and now we can publish the form to SharePoint 2010
To publish the form,  go to File | Publish and | SharePoint Server |

Publish form to a SharePoint Library
- Create or update a form library form on SharePoint
- Users can access this form Online

Publish form to a SharePoint Library

14. Publishing Wizard will come up to publish the form to SharePoint Document Library.  In  here the wizard wants you to enter the location of your SharePoint or InfoPath Form Services site. 
Enter the site name which you want to publish the form. 

Click Next

InfoPath Form Services Site

 

15.  Enable this form to be filled out by using browser if you want user to fill the form online.  Also we are publishing this form to a document library

 

Publishing to Form Library in InfoPath 2010

16. What do you want to do?
- Create a new form library or Update the form template in an existing from library.

Since I already have a form library created, I am going to update my form template in an existing form library

Create a new form library InfoPath

17.  The files listed below will be available as columns in SharePoint sites and Outlook Folder.  Go head and select the fields which you want to capture.

Selecting Fields in Infopath

 

18.  Click next and publish the InfoPath form to SharePoint 2010 Library

SNAGHTML4dc07a7

 

19. Form is published to SharePoint and click on open in  form in the Browser

Open InfoPath form in browser

 

20. InfoPath Form opens in browser and it’s ready to be filled and submit to form library.

Submit Form to SharePoint

21. Form filed information are captured in Form Library in SharePoint 2010

Form data in Form Library

If you want to know how to disable some of the features in the form submit options, please see : 

Remove Form Options in InfoPath 2010

InfoPath 2010 Advanced Form Options


When you publish InfoPath 2010 form to SharePoint 2010 to open in a web browser  Web browser the following options will be applied

Show InfoPath commands in Ribbon or toolbar

Show the following commands

- submit
- save
- save us
- close
- views
- print preview

How to disable or remove save and save us InfoPath 2010 Form features after publishing to SharePoint 2010?

InfoPath Advanced Form Options

Open InfoPath Designer 2010 and go to Click on File | Advanced Form Options:

InfoPath 2010 Advanced Form Options

In Advanced Form Options, you can disable any features you want and publish the form to SharePoint

InfoPath 2010 Form Options

Published form without save and save us features in InfoPath 2010

InfoPath 2010 Form Options - Removed

Assign a number to an InfoPath form whenever it is submitted


Problem

You want to automatically assign a number to an InfoPath form whenever it is submitted to a SharePoint form library.

Solution

Use rules, formulas, and the max() function to generate incremental numbers that can be assigned to InfoPath forms when they are submitted to a form library.

When the form library is empty, i.e. when it contains no forms, the max() function will fail and the resulting number for the first form that is submitted to the form library will be NaN. The correct numbering for subsequent form submissions should succeed. As a workaround you can manually rename the first form to 1 in SharePoint.


Steps to Follow

1. In SharePoint, create a form library to submit your forms to.

2. In InfoPath, create a new (browser-compatible) InfoPath form template.

3. Add a Text Box control to the form template and name it Autonumber.

clip_image002

4. On the Tools menu, click Data Connections.

 

clip_image004

5. On the Data Connections dialog box, click Add, and create a Receive data connection to the SharePoint library that you created in step 1. In step 5 of the data connection wizard, uncheck all fields and then check the ID field. In the last step of the data connection wizard, uncheck Automatically retrieve data

clip_image006

6. When form is opened, name the data connection RetrieveIDs, and click Finish.

 

7. On  he Data Connections dialog box, click Add, and create a Submit data connection to the SharePoint library that you created in step 1. In step 3 of the data connection wizard, click the formula button behind the File name field.

 

clip_image007

8. On the Insert Formula dialog box, type max( and then click Insert Field or Group.

9. On the Select a Field or Group dialog box, select RetrieveIDs from the Data source drop-down list box, expand all the nodes, click ID, and then click OK.

10. On the Insert Formula dialog box, type ) + 1 and click OK.

11. On the Data Connection Wizard dialog box, the expression in the File name field should resemble: max(@ID) + 1

 

clip_image008

12. On the Data Connection Wizard dialog box, click Next, name the data connection Main submit, and then click Finish.

13. On the Data Connections dialog box, click Close.

14. On the Tools menu, click Submit Options.

15. On the Submit Options dialog box, check the Allow users to submit this form checkbox, select the Perform custom actions using rules option, click Advanced, select Close the form from the After submit drop-down list box, and then click Rules.

 

clip_image010

 

16. On the Rules dialog box, click Add.

17. On the Rule dialog box, add an Action that says: Query using data connection: RetrieveIDs

18. On the Rule dialog box, add a second Action that says: Set a field’s value: autonumber = max(@ID) + 1 Note: @ID is selected from the RetrieveIDs secondary data source in the same way you selected it in step 8.

19. On the Rule dialog box, add a third Action that says: Submit using data connection: Main submit

clip_image012

***The three actions are shows above.

20. Click OK when closing all dialog boxes that are currently open.

21. Publish the form template to the library you created in step 1.


Follow

Get every new post delivered to your Inbox.

Join 109 other followers