There are heaps of articles and blogs out there that describe how to create the Contact Selector control in InfoPath 2007. I guess I just want to take the opportunity to refresh everyone’s mind on this and also show you how to create the Contact Selector in InfoPath 2010 for an InfoPath 2007 form.

Let’s start with InfoPath 2007:

Creating the control:

1. In InfoPath select Insert -> More Controls
2. A task pane comes up and on the very bottom you will have the option Add or Remove Custom Controls
3. Select this option, Click Add in the next dialog box
4. Select ActiveX Control and click Next
5. Select Contact Selector from the list of controls and click Next
6. Select Don’t Include a .cab file and click Next
7. Select Value for the binding property and click Next
8. Select Field or Group as the Field or Group Type and click Finish
9.Click Close and then OK

Creating the data structure: (Note: You have to ensure that spelling, structure and capitalisation is exactly as described in the next steps)
1. Navigate to the Data Source pane in InfoPath
2. Right click the node where you want the control’s data structure to sit within your form schema (e.g. right click “myFields”) and select Add
infopath_1
3. Add a non-repeating group as shown below. (Note: the name of this group is up to you)
infopath_2
4. Add a repeating group named Person as shown below
infopath_3
5. Add 3 text fields to the repeating group, labelled DisplayName, AccountId, and AccountType
infopath_4
Create a data source to specify the SharePoint server: (Note: this step is only applicable if you have client AND browser-based forms. If you have browser-only forms, the form will always run in the context of the site the form is published to)

1. Open up a text editor of your choice (e.g. NotePad or WordPad)

2. You can copy and paste the following:

<Context siteUrl=”http://<YourServerName>”/>

3. Save the file as Context.xml –

4. Return to InfoPath and select Tools -> Data Connections
infopath_5
5. Click Add
6. Select “Create a new connection to” and then “Receive data
7. Select XML document and click Next
8. Browse to the Context.xml file you created earlier and select it, then click Next
9. Leave the default option selected and click Next

10. Make sure “Automatically retrieve data when form is opened” is selected and click Finish
Add the Contact Selector to the form:
1. Click on the myContactSelector group and simply drag & drop it onto the form

2. The following selection comes up and you need to select Contact Selector
infopath_6
3. Last but not least TEST YOUR FORM
Show Buttons
Hide Buttons

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.