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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter Array For Two e...
Power Automate
Unanswered

Filter Array For Two excel list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Everyone

 

 

In my my flow I've have two list 

"Employee List " List  & Attandance list 

 

I've a column in my Employee List as Emploee ID  & in  Attandance List as User ID

 

When my flow runs I need to take out all the employee ID 's which are not available in the User ID in a excel file 

 

Emptyglasses_0-1682078407040.png

Emptyglasses_1-1682078454719.png

union(body('Select_from_Employee_list'),body('Select_from_Attendance'))

@or(not(contains(body('Select_from_Employee_list'),item())),not(contains(body('Select_from_Attendance'),item())))

The problem is the output of the filter array is not the unique value from the Employee List it provides an whole list some random numbers form Employee List 

Emptyglasses_2-1682078671135.png

Emptyglasses_3-1682078701206.png

 

These are two list I need to check , 

Emptyglasses_4-1682078759251.png

The output should I recieve from the filter array is this But I 'm getting differrent Values 

Emptyglasses_5-1682078825295.png

Emptyglasses_6-1682078852701.png

 

 

Could anyone please help me to fix the issue 

 

 

 

 

Categories:
I have the same question (0)
  • Chriddle Profile Picture
    8,515 Super User 2026 Season 1 on at

    Function union(array1, array2) returns all items of both collections (unique). If you input this into the Filter, you also get user ids, if they are not in the employee list.

    If you want to filter the employee list, you should use this as input - or union(body('Select_from_Employee_list'), json('[]'))  if you want unique items - and filter for not(contains(body('Select_from_Attendance'),item()))

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi , Thanks For the reposne , I've updated the query ,But it is showing the following error 

     

     

    Emptyglasses_0-1682310187982.png

    "

    Emptyglasses_1-1682310289758.png

    "Flow save failed with code 'WorkflowRunActionInputsInvalidProperty' and message 'The 'inputs' of workflow run action 'Filter_array_6' of type 'Query' is not valid. Property 'where' must be a template language expression.'.

    Could You please help me to fix this error "

     

  • Chriddle Profile Picture
    8,515 Super User 2026 Season 1 on at

    An example:

    Since the arrays come from Compose actions here, they are addressed in the filter action with outputs(...).

    Of course, if you use Select actions, you must use body(...).

     

    Chriddle_0-1682320507049.png

    Filter inputs:

    {
     "inputs": {
     "from": "@union(outputs('Select_from_Employee_list'), json('[]'))",
     "where": "@not(contains(outputs('Select_from_Attendance'), item()))"
     }
    }

     

    Filter output:

    [
     {
     "name": "Jim"
     }
    ]

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 173 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 95 Super User 2026 Season 1

Last 30 days Overall leaderboard