cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Community Support
Community Support

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
Super User II
Super User II

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
Community Support
Community Support

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

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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (4,232)