I would like to dynamically select multiple DefaultSelectedItems of a combo form control linked to a SharePoint Person or Group column that allows multiple selections. The column in my SharePoint list is named ‘Approvers’. The DataCardValue items property and DataCard Update properties are shown below:
- Items:-> Choices([@Requests].Approvers).Email
- Update:-> DataCardValue4.SelectedItems
To set the DataCardValue defaults, I created a collection (ApproverList) of user emails which is updated OnChange of the selection in another combo control used to derive the Approval Group ((Development or Maintenance).
I then use the ApproverList collection to set the DefaultSelectedItems property of the Approver combo as follows:
ForAll(ApproverList,LookUp(Approvers, DisplayName.Email = ApproverEmail).DisplayName.Email)

However, the DefaultSelectedItems are not being updated in the SharePoint list when a new order request is submitted.
I would therefore be grateful for your assistance in identifying the error(s) in my scripts and\or suggest an alternative approach to achieve the desired result.