This is a frequently-posted issue on the Community involving searching and saving details into SharePoint Person fields, both single and multiple choice. This blog explores the various ways that Users can be chosen and saved.
Standard Choices
There is often confusion around the "standard" provided Items which do not always provide a full list of employees.
These Items only provide a choice of people already in the SharePoint List - if everyone is already in there, then this can be used, otherwise one of the other two options below is needed. Also, the syntax the Schema (Table structure) of a Person Field matches that of the Items Table, so no modification of the DefaultSelectedItems (Parent.Default or ThisItem.ThePersonFieldName) or Data Card Update (ComboBoxName.Selected or ComboBoxNameSelectedItems for multiple choices) is required.
Office365Users
The Office365Users.SearchUser Function gives access to the full Entra list for the organisation. There is some flexibility of what is retreived - this Items example
allows the list to be displayed without search input (useful for small numbers), displays only current users and up to 999 entries. You can also filter this (example by
Department)
When this Schema is used, there is some modification required to the
DefaultSelectedItems of the Combo Box and the
Update of the Data Card to match that of the Person field.
DefaultSelectedItems (single choice)
DefaultSelectedItems (multiple choice)
Data Card
Update (single choice)
Data Card
Update (multiple choice)
Group membership
A filter on the membership of an Office365 Group can also be used for the Items of the Combo Box. For this you will need the Group ID, which can be obtained in the Office365 Admin Centre in the URL of the Group when selected.
The Items of the Combo Box would follow this example
This Schema also differs from that of a Person field and requires modification of the same elements as above.
DefaultSelectedItems (single choice)
DefaultSelectedItems (multiple choice)
Data Card
Update (single choice)
Data Card
Update (multiple choice)
To summarise, the Schema differences are
- Office365Users has Mail instead of the Person field Email
- Groups has displayName and mail instead of the Person field DisplayName and Email
I have also used the As disambiguation operator for the multiple choice examples - although not strictly necessary, it is more specific and always works.
I hope this is useful for your navigation of this field type and its population.