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

Community site session details

Session Id : 917/HpulrpmXxr5H/KDtso
Power Automate - Building Flows
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 18 Jan 2024 05:07:56 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 

I have the same question (0)
  • AnuraagD Profile Picture
    7 on 18 Jan 2024 at 07:18:19
    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 18 Jan 2024 at 07:14:52
    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 18 Jan 2024 at 07:09:13
    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 18 Jan 2024 at 06:34:00
    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 18 Jan 2024 at 06:21:53
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 786 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 724 Super User 2025 Season 2

#3
stampcoin Profile Picture

stampcoin 290 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading started
Loading complete