web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / select action to get i...
Power Automate
Answered

select action to get items from JSON

(0) ShareShare
ReportReport
Posted on by 381

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. 

 

Categories:
  • Verified answer
    CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Vstar19 ,

    Select Action

    From : Body('List Products')[‘value’]

    Map : item()?['PrimaryOwner']?['Email']

    Hope it helps !

  • Vstar19 Profile Picture
    381 on at

    Thank yo. 

    What is the main difference between using Body('ActionName')?[value]  & item()?[value] ?

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Vstar19 ,

    Body('ActionName')?[value] - refers to the entire array of objects from body property of the ActionName outputs.

    The  expanded formula , actuallly the  complete one is :

    outputs(‘Action_Name’)[‘body/value’],
    but powerautomate let you to directly refer to the body property of the action using body(‘action_name’).

    - item()[property name] is used inside operation actions as select to refer to a specific property of each object of the array of objects passed as From parameter.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 330

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 123

Last 30 days Overall leaderboard