Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Filter Array and then Action based on Condition

Posted on by 15
I have two SharePoint lists.
A with 306 records
B with 950 records

My flow is structured as follows
step 1 - manual start
step 2 - get items from SharePoint A
step 3 - get items from SharePoint B
step 4 - select the unique ID from SharePoint A
step 5 - select the unique ID from SharePoint B
step 6 - Filter Array to compare ID's
                From is output from Select SharePoint B
                Filter box 1 is Output Items from Select SharePoint B
                Filter box 2 is Output item from Select SharePoint A               
 
step 7 - Condition
                                If True (a match is found), then send notification to me with subject line True and body with the unique ID
                                If False (no match found), then send notification to me with subject line False and body with the unique ID

Besides the flow taking forever to run, the flow results in only False notifications regardless of whether a match is found.

I have compared the inputs from the two Select steps to make sure that the ID's are being listed in a similar format.
                Output from A looks like this
                               
                Output from B looks like this
                               
 
  • Chriddle Profile Picture
    Chriddle 7,077 on at
    Filter Array and then Action based on Condition
    I'm not sure what you are doing, but since your flow is running "forever", I assume that you use loops for this.
     
    This flow filters B for elements with ids that are also in A (Filter array-A-and-B):
     
     
    Select-A-id creates an array from A's ids:
    From: @{outputs('Compose-A')}
    Map: @item()['id']
     
    Filter array-A-and-B filters B for items with an id that's also in A:
    From: @outputs('Compose-B')
    Filter: @body('Select-A-id') contains @item()['id']
     
    Result:

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard