Hi All.
I have a Filter Array (which is called List Products) which is returning me some data from a SPO list. I need to be able to get every Primary Owner of every Product. (i have to use a filter array because the list has a calculated column that I cannot use in the filter query of get list items.
E.g of the data returned as JSON from the List Products Filter Array:
[
{
"@odata.etag":"\"37\"",
"ItemInternalId":"31",
"ID":31,
"Title":"4345GFC59D-FFDF-4EWR6-85FB-F8WQE46C7AE86",
"Name":"Test Item1",
"PrimaryOwner":{
"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
"Claims":"i:0#.f|membership|joe.bloggs@domain.com",
"DisplayName":"Bloggs, Joe",
"Email":"joe.bloggs@domain.com",
"Picture":"https://testsite.sharepoint.com/sites/mysite/_layouts/15/UserPhoto.aspx?Size=L&AccountName=joe.bloggs@domain.com",
"Department":"loreum ipsum",
"JobTitle":"Finance Manager",
}
},
{
"@odata.etag":"\"37\"",
"ItemInternalId":"31",
"ID":31,
"Title":"44WQETQ59D-WET43F-4086-84TQGT-F8QEWRTWEQTAE86",
"Name":"Test Item2",
"PrimaryOwner":{
"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
"Claims":"i:0#.f|membership|john.smith@domain.com",
"DisplayName":"Smith, John",
"Email":"john.smith@domain.com",
"Picture":"https://testsite.sharepoint.com/sites/mysite/_layouts/15/UserPhoto.aspx?Size=L&AccountName=john.smith@domain.com",
"Department":"loreum ipsum",
"JobTitle":"Finance Manager",
}
},
{
"@odata.etag":"\"37\"",
"ItemInternalId":"31",
"ID":31,
"Title":"4QWRED-FFDF-4QEWR-8QWREQRB-F8BWERQREWR",
"Name":"Test Item3",
"PrimaryOwner":{
"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
"Claims":"i:0#.f|membership|jane.lane@domain.com",
"DisplayName":"Lane, Jane",
"Email":"Jane.Lane@domain.com",
"Picture":"https://testsite.sharepoint.com/sites/mysite/_layouts/15/UserPhoto.aspx?Size=L&AccountName=jane.lane@domain.com",
"Department":"loreum ipsum",
"JobTitle":"Finance Manager",
}
}
]
I created a select statement directly below this filter array as below
Select Action
From : Body('List Products')
Map : body('ListProducts')?[0]?['PrimaryOwner']?['Email']
However, the output of the select statement is
"Joe.Bloggs@domain.com"
"Joe.Bloggs@domain.com"
"Joe.Bloggs@domain.com"
I has correctly got 3 items, but the output should be
"Joe.Bloggs@domain"
"John.Smith@domain.com"
"Jane.Lane@domain.com
Can someone advise on what i am doing wrong?. I know the map i got is wrong, but what should it be so that it list every Primary Owner?
Thanks in Advance.