I have created a form to update a record in a SharePoint list ('Risk action')where one of the columns ('Assigned to') is a Person field. I added the field to the form and a ComboBox datacard was created as usual. The combo box's Items property was defaulted to:
Choices([@'Risk action'].Assigned_x0020_to)
As this produced no names in the combo box list, I followed some advice online and added the Office365Users data source and changed the combo box Items property to:
Office365Users.SearchUser()
Now I got a list of names, but some names were shown twice, and external email addresses and group names were included.
I also wanted the list to be searchable, so I changed the combo box's IsSearchable property to true. Now the comb box just provided a text entry field where I could type, but no results were shown. After more searching on line I tried changing the Items property to:
Office365Users.SearchUser({searchTerm:valueAssignedTo.SearchText})
but this had the same result: a place to enter text but no results. In both cases, changing the combo box to searchable generated an error indicator prompting me to edit the Items property - but no error was shown in the formulas. Selecting 'Get help for this error' showed the issue to be:
Issue: Unexpected characters. The formula contains 'ParenClose' where 'Eof' is expected.
Location: valueAssignedTo.SearchItems
I'm not sure what the reference to 'SearchItems' means as I can find no such property.
I've spend several hours now changing various things, deleting and re-adding the field, all to no avail.
Can anyone help identify why the combo box cannot be searchable and if there is any way to limit the combo box results to show the same list as I see in SharePoint?