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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Update/ Create Seconda...
Power Automate
Unanswered

Update/ Create Secondary Sharepoint list from Primary SharePoint Lis

(0) ShareShare
ReportReport
Posted on by 6

Greetings.

I'm currently developing a flow in Power Automate, which runs as follow:

  • Order1 is primary list, Order2 is secondary list
  • New input will be captured in Order1 for each product ordered
     

Based on trigger, there will be revision in Order2 for every new input from Order1:

  • If the product has been ordered before (same product name as current list), it will update current line/ row in Order2
  • If the product is first-time ordered (new product), it will create a line/ row in Order2

 

Order1 is the individual product order.

Order2 is the cumulative product order.


Here's the layout for SharePoint Lists Order1 and Order2:-

straight1_0-1664424375797.png

straight1_1-1664424394772.png

 

What is the suitable walkthrough/ process flow to be created in Power Automate to 

 

I have tried this approach before:

Trigger > Get Item > Condition > Update Item/ Create Item,

but now I'm stuck at merging/ combining two or more rows (which has same product name) in Order1 to single row in Order2.

(example as above: ItemA)

 

Kindly assist

 

Thanks

Categories:
I have the same question (0)
  • v-liwei-msft Profile Picture
    on at

    Hi @straight1 

     

    The idea is as follows:

    1. When a new item is added to Order1, filter whether there is the same item in Order2. 

    vliweimsft_0-1664433084607.jpeg

     

    2. Use the condition to judge whether the length of the filter array is greater than 0. (It is greater than 0 to prove that there are identical items, and equal to 0 to prove that there are no identical items)

    vliweimsft_1-1664433104053.png

     

     

    3. When it is greater than 0, traverse the result of the filter array (although there is only one identical item), and use get item to get the initial value of the same item. 

    vliweimsft_2-1664433133778.png

     

    4. Use update item to change the value. 

    vliweimsft_3-1664433145838.pngvliweimsft_4-1664433154681.pngvliweimsft_5-1664433163650.png

     

     

    5. When equal to 0, directly use the value returned by trigger to add a new item to Order2.

    vliweimsft_6-1664433174667.png

    Test Outcome:

    vliweimsft_7-1664433205345.jpegvliweimsft_8-1664433214304.png

     

     

    Best Regards,

    Levi

     

     

  • straight1 Profile Picture
    6 on at

    Hi @v-liwei-msft 

    Thanks for the reply

     

    Just curious, what is the command/ expression for ID column at Step 3?

     

    I tried this, however there is a 'Apply to Each' added automatically at Step 1 - during Filter Array

     

    How about columns with different format or contains lots of information?
    Example: Person/ Group, Choice, Date/ Time

  • v-liwei-msft Profile Picture
    on at

    Hi @straight1 

     

    The ID field comes from Filter Array.

     

    Best Regards,

    Levi

  • straight1 Profile Picture
    6 on at

    Hi @v-liwei-msft 

     

    The solution is still not working.

     

    Questions:

    1. To sum up the several rows of the orders from the same product in Order1 to single row of aggregated sum of product in Order2

    2. To update, not overwrite or create new line/ row in Order2 for products that have been registered

    3. What is the expression of 'ID' column in Step 3 - not shown above

    4. How do I know which columns is updated?

    Thanks

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard