cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

having issues with filtering in get item

Hello Guys,

Please help

I have a list with StaffName (Person or Group)  and a Status (Ongoing, Pending, Completed) Options

Each User has multiple entries into the list

i want to filter get items to pick a user in the StaffName column and also check that Status column is showing Ongoing.

I want the comparison of the StaffName to be the Email Such that i could have a filter
StaffName.Email (like in powerapps) eq 'StaffName DisplayName'     and    Status eq 'Ongoing'



Please help!!!


1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: having issues with filtering in get item

Hi @abieba ,

 

Please refer to screenshot below to create the flow:

1.png

 

The expression in the filter array as below:

@and(equals(item()?['StaffName']?['Email'], 'Test@xxxx.microsoft.com'),equals(item()?['Status']?['Value'], 'Ongoing'))

 

Best regards,

Alice       

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Highlighted
Community Support
Community Support

Re: having issues with filtering in get item

Hi @abieba ,

 

Please refer to screenshot below to create the flow:

1.png

 

The expression in the filter array as below:

@and(equals(item()?['StaffName']?['Email'], 'Test@xxxx.microsoft.com'),equals(item()?['Status']?['Value'], 'Ongoing'))

 

Best regards,

Alice       

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper III
Helper III

Re: having issues with filtering in get item


Hello @v-alzhan-msft , 


Thank You for your response.

I have tried this but its returning null and i have a Staff Name Email and Line Manager Email that should match and an approval status showing 'Ongoing'.

niew.JPG

 

@and(equals(item()?['StaffName']?['Email'], triggerBody()?['LineManager']?['Email']), equals(item()?['Status']?['Value'], 'Ongoing'))

Regards,

Anthony.

Highlighted
Community Support
Community Support

Re: having issues with filtering in get item

Hi @abieba ,

 

Could you please share a screenshot of the configuration of your flow?

Could you please explain more details about the expression in the screenshot below:

1.png

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Helper III
Helper III

Re: having issues with filtering in get item

test screen2.JPG

 

i want to do a filter with two conditions.

GetItems(StaffName.Email) = WhenItemisCreated (LineManager.Email)

and

if the email are same it should do a check for GetItems(LeaveStatus) = Ongoing of the ones that are same. 

Highlighted
Super User III
Super User III

Re: having issues with filtering in get item

@abieba 

While the solution suggested by @v-alzhan-msft will work, I would like to suggest an alternate approach.

See my screen shot below where I use an OData filter to filter the items before they are returned by Get items - no need to filter the array, etc.  Just loop through all items returned and take action as appropriate.

ODataEmail.jpg

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Community Support
Community Support

Re: having issues with filtering in get item

Hi @abieba ,

 

Your flow is correct except that the Condition inside the Apply to each is not needed.

Please delete the Condition inside the Apply to each.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (7,205)