Using multiple Contact Selector controls in a single InfoPath form

I know what you’re thinking ….”Wooohooo … yet another article from Martin about InfoPath and the Contact Selector control!”. I know I’m sounding a bit like a broken record with this particular topic right now but there are lots of useful tips to share about this control and how to get the best of it.

If you are unsure what I mean by Contact Selector control it is a neat control that allows you to select users from a GAL-style interface within an InfoPath form:


These links provide useful reference for how to use the control

My own article: Top Tips for InfoPath form development with SharePoint: Part 1 (look for tip 4)

The InfoPath Team Blog: Using the Contact Selector Control

MSDN: The Contact Selector Control

In some types of form it may be necessary to have multiple instances of the Contact Selector control. For example an expenses form where you need a Contact Selector for the claimer's name and another for the approvers’ name.

One of the issues with the Contact Selector control is that it is not immediately obvious how you use multiple instances of it within the same form. This is because the control itself has to be bound to a very specific data structure and the naming of this data structure must be exact in order for you Contact Selector to work properly.

The way you achieve multiple instances of this is to built the data structure once and reference it to other parts of the form’s Data Source. You do this by following these steps:

1. Built the ‘source’ structure at the root of your form’s data source to look like the image below (naming, structure and capitalisation need to be exact!)


2. Create folders for each of the Contact Selector instances that your require. in our example this would be ‘Claimer’ and ‘Approver’

3. Reference the source structure to the folder you created in step 2. This is achieved by right-clicking gpContactSelector > Reference > Choose the folder you want to reference to

4. Add the Contact Selector controls to your form (from the Toolbox, if they do not shown up, read this article) and bind them to the  referenced gpContactSelector folder beneath the folder that represents the field the form need to capture information for. For example the ‘claimer’ should be referenced to <root> / Claimer / gpContactSelector. Your final form should look like this (shown in Visual Studio 2008):


That is it, you are now done and both Contact Selector controls can independently store data in your form.

If you would like a copy of teh XSN for this article, please contact me using the details below.

This article was published by


Martin Kearn
Senior Consultant
Microsoft Consulting Services UK

Click here for my bio page

Comments (29)
  1. Top News Stories Office 2007 Service Pack Boosts Performance (Technologizer) Service Packs are usually

  2. Sharmalie says:

    Is there a way to limit the number of people selected to 1?

  3. ukpoint says:

    In repsonse to Sharmalie’s comment: yes there is a ‘hacky’ way to limit the number of contents in the control but it is not very nice and required a good understaidng of tehunderlying data structure. I may blog about it some time soon but basically involves addin a load of conditional formatting to the control (or you submit button) based on certians values in the contact selector. Even if you do so this, you cannot stop users entering multiple values, but you can stop them submitting the form if there are multiple values.

    Martin Kearn

  4. Kevin Houston says:


    Thanks for the tip!

    I am stumped at how I can get the values of the seperate contact selectors to populate alternate columns within the form library!?

    Any suggestions?


  5. Amod says:


    I have a IP 2007 form(web) that I am publishing over SharePoint site running InfoPath form services. I followed the exact steps mentioned to create 2 groups for 2 contact selectors I need to embed into the form. It gives me error when I open the form from the form library.

    I also tried creating just 1 group without using the referencing concept, it works fine, but not with referencing in 1 group or 2.

    Can you help me out with what might I be missing or need to add. Any requirements/schema change on web based forms over SharePoint?

    I appreciate your talent and your posts.

  6. Jason Dunbar says:

    Hello all,

    This post is a great help but there’s one thing to point out – I’ve found that it’s important to ensure the Person group is a direct child of the group you create for each Contact Selector.

    i.e. If you create a group named ‘Claimer’ as in the given example, you must ensure that the reference is set on ‘Person’ not ‘gpContactSelector’.

    Your element hierarchy should look something like this:

    – Claimer

    – – Person

    – – – DisplayName

    – – – AccountId

    – – – AccountType

  7. Hikmer says:


    As the English would say…your instructions are rubbish!  I wasted a full day of work until I read the last post by Jason.  ANYONE READING THIS AND NOT WANTING TO WASTE A BOATLOAD OF TIME STEP 3/4 IS WRONG!

    Bind to Person not the group folder otherwise you will get nasty SharePoint errors.  Please fix this Martin, there are a lot of links to your site all over the place and this is the only site that explains this feature of InfoPath.

  8. Naresh says:

    Thanks this post helped me a lot

  9. Eric says:

    Hikmer is quite correct, though I might have phrased the critique more kindly!  Both this post and the original source on the Infopath Team blog at are propagating incorrect information, and Martin clearly didn’t test this before taking screen shots and publishing.

  10. Pankaj says:

    Thanks a lot martin for the post and also thanks Jason.

  11. Petra says:

    Thank you Martin, this helped me a lot! Not rubbish at all, I got it working right away 🙂

  12. ukpoint says:


    Responding to Jason Dunbar, Hikmer and Eric.

    Just looking through the comments and it seems like a few of you have had troubles with these steps – especially steps 3/4. I have just re-checked and the orginal steps are correct. In my scenario I DO bind the Contact Selectors to the referenced gpContactSelector (not person) and it works.

    In reference to Jason’s comment, if you look at my screen shot you’ll see that my person groups are beneath the referenced gpContactSelector group not the claimer / approver groups. Looking at the element structure you have posted, i suspect that you have manually created these, not referenced them because if they were reference (as the post advises) you would have to have the gpContactSelector node in there too?

    The key thing that people seem to be missing is that the nodes beneath claim and approver are REFERENCES of the source gpContactSelector node, they are NOT manually created. Please carefully re-read step 3.

    Please be assured that I always test this stuff before i blog it and on both occasions (when i orginally wrote the post ) and just now, the steps work.

    In terms of why this is not working for others, all i suggest is to try the folloinwg:

    – ensure you are binding to the referenced gpContactSelector not the source one

    – ensure that the nodes beneath claim and approver are reference not manually created nodes (that is the whole point of the article)

    – ensure you have capitalistaion correct

    If anyone continues to have issues, please contact me on and I’ll do what i can to help you.

    Regards – Martin

  13. ukpoint says:

    Further to my repsonse above, if anyone wants a copy of the XSN for this artcle, please email me and I’ll happy send it to you.

    Regards – Martin

  14. Petra says:


    I have a question about the view columns in the document library I’ve published the form to. Is there a way to change the column headings for the contact selector columns? As it is now, they’re all showing as ‘Display Name’.



  15. Petra says:


    Sorry, never mind my question above. I found a way of solving it.



  16. Sunjay says:

    Hi martin

    Abosolutlely Cowabunga maaan. Thank you. Just need to follow the instructions properly.  And it wasnt roobish mate.

  17. Bob says:

    Hey Petra, how did you change the column name?

  18. Dennis says:

    I have been having problems getting the contact selector to work with Office SP2.  I am not able to bind a group to the Contact Selector.  I tested this because I have one system with SP1 and one with SP2.  It works great in SP1 but is broken in SP2.

    Anyone else seeing this?

    In addition, I had to bind to the group 1 level above Person (repeating field) to get this to work in InfoPath Form Services.


  19. David says:

    Using Form services.  Everytime I test this with multiple selectors on the page IE crashes.  As soon as I remove all but one of the selctors it works file.  I followed all the instuctions, inlcuding binding to the gpContactSelector folders under the manually created folders.

  20. Rui says:


    Thank you for the post.

    I was able to get multiple Contact Selector controls working on my form, but I could not see the user name when I preview the form.

    Any ideas?



  21. Egglis says:

    Setting the reference to 'Person', rather than 'gpContactSelector' worked for me.  

  22. Thanks a lot Martin. The article was very useful to me

  23. Tuff says:

    I've been using the Active x Contact selector for some time without any issues. I have come across one anomaly that I can't seem to resolve. We have a form that is using the contact selector and is served up via Form Services. Our user profiles are synchronized from Active Directory. One of our users had their title changed. We verified that the user profile in MOSS reflects the correct information. Unfortunately, the pop-up that the contact selector presents, still reflects the old information. We've been able to test out changing another person's title and the contact selector eventually presents the new value. We have tried changing the user profile several times and even went as far as deleting the user profile and re-importing with no success? Does anyone know how or where this information is cached and how to resolve this?

  24. Raj says:

    If any guy knows about the sharepoint infopath form data need to saved in the list with out using any code .Please help me

  25. mansour fallah ghanbari says:

    Thank you Martin,that's great

  26. Saytzeff says:

    Hi  Martin,

    Multiple control selectors are causing Infopath form to load slowly. Is there any way, I can configure these control selectors to pick data from SharePoint group rather then AD. And will this solve the performance issue??

  27. Naveen says:

    Hello  Martin,

    Thanks for the post, it helped me a lot..

    Getting to the questions,

    1) What are the default fields  used/displayed by the contact selector control. ?

    2) Can we get other attributes like Mailbox OU, Primary SMTP address ?

    3) Once I Select a user from the control , can i set other fields value with Mailbox Ou , Primary SMTPaddress ?.

    All Help appreciated.



  28. Naveen says:

    Adding to above  post:

    My environment is Office/ Infopath 2007, Sharepoint 2007 Exchange 2007

    hope this helps …

Comments are closed.

Skip to main content