User Limited Group Selection

A SharePoint 2010 custom people picker field.

This custom field has been reverse engineered from the default SharePoint people picker field. It looks and behaves exactly like the original.


The field is completely compatible with the default SharePoint infrastructure, the field expands and augments the existing people picker (base) classes.


Advantages over the existing SharePoint people picker:

  • Selection of the AD group from which to pick people
  • The group filter setting can be set on the field (unlike the default SharePoint people picker which sets it for the entire web application)

Adding the field to a list.

Editing the column.

You can add the custom field to a Visual Studio SharePoint project using the following markup.

<Field ID="{cd0ce85c-2501-4563-a041-789941191e59}"
       Type="UserLimitedGroupSelection"
       StaticName="ULGS"
       Name="ULGS"
       DisplayName="ULGS"
       Required="FALSE"
       EnforceUniqueValues="FALSE">
	<Customization>
		<ArrayOfProperty>
			<Property>
				<Name>GroupName</Name>
				<Value xmlns:q1="http://www.w3.org/2001/XMLSchema" p4:type="q1:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">Administrators</Value>
			</Property>
			<Property>
				<Name>ShowUsers</Name>
				<Value xmlns:q2="http://www.w3.org/2001/XMLSchema" p4:type="q2:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">true</Value>
			</Property>
			<Property>
				<Name>ShowGroups</Name>
				<Value xmlns:q3="http://www.w3.org/2001/XMLSchema" p4:type="q3:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">true</Value>
			</Property>
			<Property>
				<Name>AllowMultipleValues</Name>
				<Value xmlns:q4="http://www.w3.org/2001/XMLSchema" p4:type="q4:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">true</Value>
			</Property>
		</ArrayOfProperty>
	</Customization>
</Field>

Last edited Jan 25, 2013 at 9:48 PM by fvanonckelen, version 10