Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Power Automate flow to Add a row based on Rows from Another Table satisfying multiple criteria

(0) ShareShare
ReportReport
Posted on by 7

I'm working on a flow which picks the rows from two tables, it filters out data from the second table - if Status = 'Processed' in the ODATA query, subsequently this is taken as an input to Filter Array ( source is the second table again ) where the condition is to check whether any value in the Key column of the second table is present in the Unique Key column in the first table - for this I used the dynamic content from the list rows from both the tables respectively; if Key is not present in unique Key, the flow should proceed to add a row to the first Table (DemoTable in ZDemoLog). For mapping the fields I used the expression "items('Apply_to_each_2')?['Serial No.']" to map the serial number and so on. 

 

Currently, there are no rows added, and the filter array is not initiated, and just skipped.

AnuraagD_0-1705553426119.png

AnuraagD_1-1705553458699.png

 

The flow runs successfully, however there are no new rows added into the table based on the given criteria. 

 

Any help would be appreciated.

 

@ManishSolanki 

  • AnuraagD Profile Picture
    7 on at
    Re: Power Automate flow to Add a row based on Rows from Another Table satisfying multiple criteria

    Thanks though, I'll try to work something else out and update it out here should it work. I'm unable to get rid of the duplication, would you have an idea why though ?

  • v-xiaochen-msft Profile Picture
    on at
    Re: Power Automate flow to Add a row based on Rows from Another Table satisfying multiple criteria

    Hi @AnuraagD ,

     

    I don't know why there is duplicate data.

    Since you want to add data from the second table to the first table, the traversed object should be the second table instead of the first table.

     

    Best Regards,

    Wearsky

  • AnuraagD Profile Picture
    7 on at
    Re: Power Automate flow to Add a row based on Rows from Another Table satisfying multiple criteria

    Hi, I tried out the same, it skipped when I put 

    length(body('Filter_array')) is equal to zero, so i flipped the condition to if not an empty array, i.e. doesn't contain zero. 

     

    Now it does populate the Excel and adds a row, however duplicates keep generating even though there's a key filter each time. 

     

    So I made a minor change again,  I filter the array of the first table (Line Schedule Table instead) and left the other parts the same.

    I have attached the flow below

     

    Here are the screenshots - Excel Table

    AnuraagD_0-1705561342553.png

     

    Current flow - 

    AnuraagD_1-1705561454718.png

    Is it possible that we filter out the array from the second before running through each.

     

    It does add values now though

     

  • AnuraagD Profile Picture
    7 on at
    Re: Power Automate flow to Add a row based on Rows from Another Table satisfying multiple criteria

    Will try it out and give feedback 

  • v-xiaochen-msft Profile Picture
    on at
    Re: Power Automate flow to Add a row based on Rows from Another Table satisfying multiple criteria

    Hi @AnuraagD ,

     

    Please try this

    vxiaochenmsft_0-1705558760923.png

    Apply to each input: outputs('List_rows_present_in_a_table_2')?['body/value']

    Filter Array input: outputs('List_rows_present_in_a_table')?['body/value']

    Filter Array left parameter: item()?['Unique Key']

    Filter Array right parameter: items('Apply_to_each')?['Key']

    Condition: length(body('Filter_array'))

     

    Best Regards,

    Wearsky

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1