Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Does anyone know how I can filter Person/Group Picker (PeoplePicker) within InfoPath to return only user profiles from a SharePoint site and not the SharePoint groups?

Using People Picker within a SharePoint list, you can indicate that you want people or people and groups, no so with InfoPath People/Group Picker (as far as I can tell).

share|improve this question
add comment

2 Answers

Short answer, no, you can only select users in the profile database.

The People Picker you get in InfoPath 2007 is an ActiveX control there's little option for customization. The selection of people comes from the users in the profile directory so you can't direct or configure it like you can with the browser picker. The two are different beasts so don't try to compare them feature-wise.

In InfoPath 2010 the story changes as the People Picker is now a native control and allows you to specify all the same features you see in the browser/site version including a specific SharePoint Group to select from.

Hope that helps.

share|improve this answer
add comment

If memory serves, the People Picker returns a display name, an account name, and an account type. I'm not totally sure about 'SharePoint groups' but you can filter out AD groups because the field AccountType will return the string 'group' if it is a group, likewise 'user' if it is a user, etc. You can store this value in a hidden field or just validate directly against the accountType field from some other control. You can also weed out duplicates by storing a function value which is the count of the displayName. Lastly I think you can also validate against rubbish entered because the displayName will be empty since AD didn't find that value (..or is that accountName?, ..can't remember. Chuck both values onto the form and see the results when previewing examples to see which one it is. I think it is displayName.)

Hope this helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.