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

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

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


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

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

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

@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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (13,261)