@Anonymous
You will need to provide a table of records that match what you have in the Items property of the combobox!
What I would consider is to reduce the schema of the Items record to the bare minimum. So, since you are interested in the DisplayName and Email address, those would be the ones.
So the Items property of the Combobox would be:
ShowColumns(Office365Users.SearchUserV2(Self.SearchText).value, "Mail", "DisplayName")
Then, for simplicity, it would be easier to store both columns in your data field.
So the Update property of the Datacard with this combobox would be:
Concat(yourCombobox.SelectedItems, Mail & "~" & DisplayName & ";")
Finally, in the DefaultSelectedItems property of the Combobox, the following formula:
ForAll(
Filter(
Split(Parent.Default, ";"),
!IsBlank(Result)
),
With({_s:Split(Result, "~")},
{Mail: First(_s).Result,
DisplayName: Last(_s).Result
}
)
)
In this case, the DefaultSelectedItems table will have records with Mail and DisplayName...which will match the records of the Items property.
I hope this is helpful for you.