0

Tried several codes but I can't get it:

Patch(DUTY, Defaults(DUTY),{

 OCC_Claims:{
            Claims: "i:0#.f|membership|" & Lower(cmb_soconduty_login_1.Selected.Email),
            Department: "",
            DisplayName: "",
            Email: "",
            JobTitle: "",
            Picture: "" } })

Situation: Selecting 2 items in cmb_soconduty_login_1. For ex: [email protected] and [email protected]

Result in SharePoint list: person2gmail.com, person2gmail.com

How can I make it to: persongmail.com, person2gmail.com

1
  • What is the data type of OCC_Claims column in SharePoint list, Text or People (Person or Group)? If People, does it allow multiple selections in the list? Commented Jul 3 at 12:14

1 Answer 1

0

Considering, OCC is your column name and column type is "Person or Group" with multiple selections allowed in the SharePoint list AND cmb_soconduty_login_1 is combo box in Power Apps which also allows multiple selection:

Try using code like:

Clear(colOCC);

ForAll(
    cmb_soconduty_login_1.SelectedItems,
    Collect(
        colOCC,
        {
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Department: "",
            Claims: "i:0#.f|membership|" & ThisRecord.Email,
            DisplayName: ThisRecord.DisplayName,
            Email: ThisRecord.Email,
            JobTitle: "",
            Picture: ""
        }
    )
);

Patch(
    DUTY,
    Defaults(DUTY),
    {
        OCC: colOCC
    }
)

You can change the ThisRecord.Email and ThisRecord.DisplayName property names as per the data source you are using for cmb_soconduty_login_1 combo box.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.