cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sofie_D
Responsive Resident
Responsive Resident

Duplicate sharepoint list with Flow

I have a sharepoint list in which a flow sometimes adds items, but at the start of every year it should be stored in a new list, that is identical to the previous one.

Is there a way to automatically create an empty list with the same columns when needed? Right now a new one is manually added every time.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Sofie_D,

 

Do you want to create an empty SharePoint list with same columns as previous one within Microsoft Flow automatically?

 

Creating an empty SharePoint list is not supported in Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

In addition, you could consider take a try to delete all original items within the SharePoint list at the start of every year as an alternative way. I have made a test on my side and please take a try with following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@equals(utcNow('MM/dd'), '01/01')
  • Within "If/yes" branch of Condition, add a "Get items" action, specify Site Address and List Name. Then add a "Apply to each" action, input parameter set to output of "Get items" action. Within "Apply to each" action, add a "Delete item" action, specify Site Address and List Name, Id field set to ID dynamic content of "Get items" action.
  • Under Condition, add a "Create item" action.

Image reference:19.JPG

 

20.JPG

 

The flow works successfully as below:21.JPG

 

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @Sofie_D,

 

Do you want to create an empty SharePoint list with same columns as previous one within Microsoft Flow automatically?

 

Creating an empty SharePoint list is not supported in Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

In addition, you could consider take a try to delete all original items within the SharePoint list at the start of every year as an alternative way. I have made a test on my side and please take a try with following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@equals(utcNow('MM/dd'), '01/01')
  • Within "If/yes" branch of Condition, add a "Get items" action, specify Site Address and List Name. Then add a "Apply to each" action, input parameter set to output of "Get items" action. Within "Apply to each" action, add a "Delete item" action, specify Site Address and List Name, Id field set to ID dynamic content of "Get items" action.
  • Under Condition, add a "Create item" action.

Image reference:19.JPG

 

20.JPG

 

The flow works successfully as below:21.JPG

 

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,283)