Showing posts with label Infopath 2010. Show all posts
Showing posts with label Infopath 2010. Show all posts

April 27, 2012

Creating form in InfoPath 2010 and publishing to SharePoint 2010

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 NextInfoPath 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 :

April 03, 2012

To upload Form Template(xsn) in Infopath 2010

Step 1:Upload form template in central admin
General Application Setting  ->Manage Form Templates
Upload  form template



Step 2:Choose the template and upload.
Step 3: Activate to a  site collection ex:http://sp05:2222
Step 4: Go to site


In Advanced Setting :  Allow management of content types?    Yes
Step 5: Click on Add from existing site content type



Step 6: Add Content Types Change New Button Order and Default Content Type

March 30, 2012

Save the Fileds in Form Library using Infopath

Step 1:Go to Infopath choose blank form

Step 2: Select  container selection option and set Rules for Date
 

Step 3:Right click the Date TextBox control and Go to Properties:

And set value: substring-before(now(), "T")




<><><><> <> <><><><> <>


























 Step 4:

Right click the Time TextBox control and Go to Time properties:

And set value: substring-after(now(), "T")
































 Step 5:

In  Data Tab à Click the submit option

Select the document library optionà Choose a data connection for submit  à Add




















Step 6:

Set File name: click  and select Insert Function and choose concat and select fields like: concat("save", Date, "-", Time)


















After the fields are set  click Next button and Finish.

Step 7:
Select File TabàPublishàSharepoint server and publish Your site.

March 29, 2012

How to Create an InfoPath Form to Auto Populate Data in SharePoint 2010

Resources List

Create a custom list and create the fields as shown. Notice we are using “Single line of text” for the email instead of “Person or Group”.
The original “Title” column was renamed to E-Mail and requires unique values because I didn’t want someone to add themselves more than once.
The Skills column is a Lookup type that allows multiple selections tied to the Skills list.
The Title column is a new column is for the title of the resource.
 
Under General Settings, choose Advanced Settings. We need to change Item-Level Permissions and Attachments – all other settings are to stay at their defaults. Users should be able to read all items but only create and edit their own items; additionally we aren’t allowing attachments because they aren’t necessary for this list.
After you have the columns created for the list, it is time to customize the input form.

Customize InfoPath Form

From the Resources list, click the List tab then Customize Form.
The customize Form button will automatically launch InfoPath 2010 and will look similar to this. The red asterisks in the Fields pane indicate required fields. You can see the exact correlation on this form and our SharePoint list fields from above.

Enable SOAP Web Services

We need to enable the SOAP Web Services so we can pull information from the User Profile Service. Click the Data tab, From Web Service, From SOAP Web Service.
In the Data Connection Wizard, type the URL of your site and add /_vti_bin/UserProfileService.asmx to the end as shown and click Next
After the connection is made to the web service, scroll down to find the operation called GetUserProfileByName and click Next
Click Next on the Parameters dialog box
Click Next on the following screen
Enter a name for the data connection and click Finish.
On the right side under the Fields pane, select Show Advanced View
So far we have created our custom list, started customizing an InfoPath form and added the User Profile Service web services to the form. Now we have to create rules on what to do when the form loads.

Create Rules

Make sure you have the Data tab selected then choose Form Load. We will be using the Rules: Form Load section to create the rules and actions. Select the New button and choose Action. Our first rule is going to check the Account Name of the currently logged on user.

Account Name of Current User

Type a name for the rule under Details for then click the link under Condition that says “None – Rule runs when form is opened”
In the Condition dialog box, click the arrow next to myFields and choose Select a field or group…
In the Select a Field or Group dialog box, change the Data source to GetUserProfileByName (Secondary)
Under myFields, expand queryFields until you find and select AccountName then click OK
Change the Condition “is equal to” to “is blank” and click OK

Query for Data: GetUserProfileByName

In order get populate our form, we need to query the User Profile Services web service. In our Form Load data box, click Add to run an action and choose Query for data. Change the Data connection to GetUserProfileByName and click OK.
Next we need to get the data from the User Profile Services web service to populate our form with the current users’ data.

E-Mail Data

Click Add and choose Set a Field’s value
Click the expander  next to Field.
Ensure you are on the Main Fields then expand MyFields and select E-Mail and click OK
  1. Back at the Rules Details dialog box, click the Value icon  (this gets tricky :-))
  2. Insert Formula dialog box, click Insert Field or Group
  3. On the Select a Field or Group, change Fields to GetUserProfileByName (Secondary) and expand dataFields until you can select Value and click Filter Data
  4. On Filter Data, click Add
  5. In Specify Filter Conditions, change Value to Select a field or group
  6. In the Select Field or Group, and choose Name under PropertyData and click OK
  7. In the third box, change to Type Text… and type in WorkEmail and click OK on all the dialog boxes to create the rule
Let’s check to make sure we did this right. Click the Preview icon in the top left of the screen and you should see your email address populated in the E-Mail field

Final step:

Central admin ->Service application ->Manage service application ->User Profile service Application ->People->Manage User Profiles

Click on the Account name and edit the profile of the user after the profile is searched .