2

I am working on a team site collection inside my sharepoint 2013 on-premises. and i am facing this issue which i thought sharepoint will provide out of the box, but seems it does not.

now i have a SharePoint Security Group named "software development members", and i want to define a site column of type "Person or Group" which will allow selecting a single user from the group or the group itself. so i tried the following settings:-

enter image description here

but this will only allows me to select from members inside the group and not the group itself. now if i change the Choose from to be All Users this will allow me to select the "software development members" group, but i will be facing another issue that users can select any group or any user which of course i do not want to have!! so can anyone advice on this please?

1

The workaround would be as follows

  • Create an AD group with a list of users in your SharePoint group.
  • Add this AD group to SharePoint group.
  • You can choose that AD group from people picker.
  • but currently we do not reply too much on AD groups.. i am trying to find a way to fix this using SP groups.. if possible – john Gu Jun 21 '17 at 1:09
  • 1
    If you want to achieve using only SharePoint group you can add a button right next to people picker says "Add all users in group". On button click add all users to people picker programmatically using JavaScript. – Venkat Konjeti Jun 21 '17 at 1:35
  • but this appraoch will fail in the following scenario. let the "software development members" contain 2 user UserA & UserB. and i create a new item and i checked the "Add all users in group", so using JavaScript i will be assigning UserA & UserB to the current item. then later on we decide to modify the "SD members"; by adding UserC and remove userB. so in this case i need to write a schedule application which runs let say each hour to check is the members for the "SD members" are in sync with the item's person or group column is this correct? so seems thing will become a bit complex. – john Gu Jun 23 '17 at 13:56
  • Yes. you are right. This case won`t work. To overcome all these issues you may have to go with AD group that way whatever you add and remove that will apply automatically. The next solution is leaving a people and group to All groups and add a validation that user is available in the "Software Development Group" and group you are adding is "Software Development Group". – Venkat Konjeti Jun 23 '17 at 14:05
  • If you want to go with above custom validation you can do it in PreSaveAction method or jQuery on change event. – Venkat Konjeti Jun 23 '17 at 14:07
1

I wouldn't fuss with it :) If your logic can handle it, I'd leave the people group for selecting people within your group, and add a checkbox field under it for 'Select full group'.

  • i did not get your point on this.. can you explain it in more details? – john Gu Jun 21 '17 at 1:10
  • 1
    I wouldn't try to get the people field to select both the internal people in the group OR the group itself, since it can't do that specifically. I'd create the people group to pick from "software development members", then create a separate field, call it "Select All Members". In the people field description you could say "Select developer or use the check box below to select all" Not sure where you're going with this, but example: in workflow, you could check if the 'Select All Members' is checked, and if it is email that group. If not checked, email the individual in the people field. – Robin in Or Jun 21 '17 at 14:48
  • i thought i can achieve this out of the box ,,, but seems things will require adding additional column and do checks if the checkbox named "Select All Members" is checked or not. instead of just relying on a single person or group side column. to get the assigned users or group.. – john Gu Jun 23 '17 at 13:58
-1

Ok, Do a workaround. Create a similar group(for example Group XYZ) and add all the users from Software Development Members group and the Group itself in XYZ group. Now in this new column you take the value from XYZ group. This will give you all the members as well as the group B-)

  • 1
    You cant add a group inside another group. – Gautam Sheth Jun 20 '17 at 14:57
  • @Ankit as Gautam mentioned i can not add a group inside another group! – john Gu Jun 20 '17 at 15:07
  • ok..yeah..well you can go for an AD group and add it inside Sharepoint group. I forgot to mention the AD group thing – Ankit Kumar Jun 21 '17 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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