Everything SharePoint and XAML

My continuous learning of SharePoint, XAML, Silverlight, Windows Phone 7, Windows 8, Office, VSTO, C#…

InfoPath – Configuring Contact Selector

Posted by Steve Pietrek on January 16, 2009

In this post I documented the steps to add the InfoPath Contact Selector to the Controls toolbox. The Contact Selector is an ActiveX control which is installed with Microsoft Office 2007. If you attempt to add the Contact Selector directly, publish the form, and test out selecting a user, when you click the OK button in the People Picker, you will receive an error.

The followings steps document how the Contact Selector should be added to a form to avoid the error:

  1. Open your form in Design mode in InfoPath 2007.
  2. Select View-Design Tasks from the menu.
  3. Click the Data Source link.
  4. Important Note: Spelling and capitalization are important. grpPerson is not the same as Person. Found that out the hard way.
  5. Right-click in the section where you want to add the control and select “Add…”. Specify a name. Set the Type option to Group. Do not check the repeating check box. Click OK to save.
  6. Right-click the new group added in the previous step and select “Add…”. For the name, type in Person. Set the Type option to Group. Check the repeating check box. Click OK to save.
  7. Right-click on the Person group and select “Add…”. For the name, type in DisplayName. Click OK to save.
  8. Right-click on the Person group and select “Add…”. For the name, type in AccountId. Click OK to save.
  9. Right-click on the Person group and select “Add…”. For the name, type in AccountType. Click OK to save.
  10. Drag the group created in step #5 to the location in your form where you want the Contact Selector to be displayed. A popup menu will display – select Contact Selector.
  11. Open an editor (I used NotePad++).
  12. Type in the following and replace yourservername: <Context siteUrl=”http://<yourservername>”/&gt;
  13. Save the file as Context.xml.
  14. In InfoPath, select Tools-Data Connections from the menu.
  15. Click the Add button, check the “Create a new connection to” option, and check the “Receive data” option. Click the Next button.
  16. Check the “Xml document” option. Click the Next button.
  17. Browse to the location where you saved the Context.xml file and open it. Click the Next button.
  18. Check the “Include the data as a resource file in the form template or template part” option. Click the Next button.
  19. Enter the name Context. Click the Finish button.
  20. Save the form.
  21. Publish the form.

Here is a good post on adding mulitple contact selectors to a form.

Advertisements

Sorry, the comment form is closed at this time.

 
%d bloggers like this: