The Picker control can sometimes be a hassle to work with. Especially if we need to filter down to increase performance. To start, here are a few tips to look out for.
- SharePoint Lists that use a People/Group column will have a Picker added to the View by default. This Picker uses a special Smartobject that takes SharePoint User IDs and translates them to AD usernames/emails/login names. It will also translate this to the K2 FQN, which can be helpful for assigning tasks and sending emails.
- Another note about these SharePoint pickers, they will be called (ColumnName) Text Box. This is because the the field starts as a Text box and is changed to a picker. Feel free to rename the control to cut down on confusion.
- Filtering on a Picker can be tough. We can filter down by Domain, which can increase performance by a lot, or by K2 Security Label, which filters out even more (We will need to be set up for multiple Security Labels).
- However, this picker will still search all SharePoint users in addition to our User Manager, which can be very large in SharePoint Online/AAD environments. This can cause the picker to be much to slow. Instead we can use a different smartobject to filter down to Groups.
- The UMUser SmartObject allows us to filter down further or access users that do not have accounts in SharePoint. This SmartObject uses K2's User Manager and I highly recommend using this smartobject.
- It can be found in the System > User Management > SmartObjects categories. We need to provide a Security label (K2 is a default one) but then you should be able to return whatever you would like.