I'm trying to use spservices to dynamically update the SharePoint group that a People picker field is linked to, based on other selections a user has made in the new item form. Haven't been able to find any documentation around programmatically setting the SharePoint Group a people field is linked to - is this possible using javascript (I will not have access to InfoPath or SharePoint Designer)?
-
Do you want people picker target to specific group? If yes, we can set from the people field settings. If not this can you explain further about dynamic?– Venkat KonjetiMay 19, 2017 at 16:12
-
Hi Venkat - I've set the sharepoint group in the field settings, but was wondering if it's possible to change that group dynamically based on other selections in the New Item Form when it's being run.– BrokenRecordMay 22, 2017 at 6:50
-
You can not change as the user filling the form may not have full control and once the form has been loaded any changes to the field won`t reflect. Are you trying to restrict users from SharePoint group?– Venkat KonjetiMay 22, 2017 at 12:55
1 Answer
It would be possible by updating the field XML schema, but it would also affect the whole list, not just the form for item submission. Moreover, if you change the list fields during form completion, you won't be able to successfully submit it without reloading the page, so you need to reconsider.
-
Thanks Alexey - so there's no way to update the linked SharePoint group for a people picker during runtime? May 22, 2017 at 6:51
-
No way to do exactly that without interrupting the user who is trying to fill out the form at the same time. May 22, 2017 at 7:34