Re: Array must be of primitive type error when appending to an array variable
Hello @smorley ,
when you lookup the other list using 'Get items', it'll always return an array = it'll always add 'Apply to each'. If it returns just 1 item it's not a problem as it'll loop only once through that 1 item.
Then the 'Select' action works in a way that you'll input an array = multiple choice people picker, and select from all the available information on the email address. The full content of a multiple people picker column will look like this:
[
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
"Claims": "i:0#.f|membership|user1@company.com",
"DisplayName": "User One",
"Email": "user1@company.com",
"Picture": "https://..."
},
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
"Claims": "i:0#.f|membership|user2@company.com",
"DisplayName": "User Two",
"Email": "user2@company.com",
"Picture": "https://..."
}
],
With the 'Select' action you can take that array, and tell the flow to return only a specific property from that array. You define the 'key' = Claims and the value you want to assign to that key in the result = Approver Email.