cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Use a flow to update a second Sharepoint list

I have a list A with columns:

 

Date:SomeThingOwner
2020-04-09CarJames
2020-04-09TableJenny
2020-05-09ChairJames
2020-06-09PensilTom
AND SO ONAND SO ONAND SO ON

 

And want to make another list B where Power Automate does the work. I want the list to look like this:

 

Date:JamesJennyTom
2020-04-09Car Table 
2020-05-09Chair  
2020-06-09   Pensil
AND SO ONAND SO ONAND SO ONAND SO ON

 

I have tried many things with if then, but I cant get it to work. In list B I only want the date on one row, and the flow has to update with new dates when they are put in list A, and then put the right thing to the right owner on the right date.

 

Maybee someone has a better solution to this? I appriciate any answers. Please explain to a novice.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Use a flow to update a second Sharepoint list

Hi @R4ffen,

 

According to your requirements, you should create two Flows as below:

Flow one, get all dates from List A, then get an array of Dates without repeat date by the following expression. Then create items in List B:

union(body('Select'),body('Select'))

Annotation 2020-04-10 142836.png

 

Annotation 2020-04-10 142918.png

 

Flow two, Get items in List A, then create Switch action to according to the owner to choose put the SomeThing into which column in List B:

Annotation 2020-04-10 144708.png

 

Annotation 2020-04-10 144748.png

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Use a flow to update a second Sharepoint list

hi @R4ffen  this is exactly what you need

http://johnliu.net/blog/2018/6/do-group-by-in-flow-with-two-simple-elegant-loops



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
Community Support
Community Support

Re: Use a flow to update a second Sharepoint list

Hi @R4ffen,

 

According to your requirements, you should create two Flows as below:

Flow one, get all dates from List A, then get an array of Dates without repeat date by the following expression. Then create items in List B:

union(body('Select'),body('Select'))

Annotation 2020-04-10 142836.png

 

Annotation 2020-04-10 142918.png

 

Flow two, Get items in List A, then create Switch action to according to the owner to choose put the SomeThing into which column in List B:

Annotation 2020-04-10 144708.png

 

Annotation 2020-04-10 144748.png

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Regular Visitor

Re: Use a flow to update a second Sharepoint list

Hi @v-litu-msft 

 

Thanks for that solution, It worked. But I need to upgrade it. I need to be sertain that it never writes more than one row with the same date, so that the first flow with the "create Item" in sharepoint list dont add another row with the same date. I want it to add new dates from list A but not if it already exist i list B. I quess this is a common challenge updating list from one list to another.

 

And second: I have 7 different names, thats 7 different case in the switch. Is this going to be slow when it has to work with many rows?... It is some way to make it work faster? It has to load list B many times for example....

 

But thanks again!

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (4,754)