3

I need to create a SharePoint 2013 field that only accepts groups (from SP, not AD). I know I can add UserSelectionMode="PeopleOnly" to make it accept only people, but I want the opposite. Is there any way I can accomplish this? Thanks!

EDIT1: Just to clarify, I do not want to pick users from a specific group, but select "SPGroup"s from a people picker control

EDIT2: Thanks for all the help! For now, I'm gonna go with an event receiver to validate the value against the groups of the site. Maybe I'll change to the PrincipalAccountType solution later.

3
  • did you try PrincipalAccountType="SPGroup"? Commented Jun 27, 2016 at 9:47
  • That's what I'm looking at right now. Commented Jun 27, 2016 at 9:47
  • So have a look on my answer Commented Jun 27, 2016 at 9:48

3 Answers 3

0

Try modifying PrincipalAccountType="SPGroup" as MSDN says.

String used to specify the type of principals to be resolved in a query Comma-separated : "User,DL,SecGroup,SPGroup"

0

Create field and while creating come at down near Choose from option and select Share Point Groups and define group name under Choose from:.

Hope this will help you...

0

You can use UserSelectionScope="GroupID" attribute to specify a group in your CAML query. GroupID is a group ID (integer).

You can see property description on the MSDN field schema description page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.