Forum Discussion
Sharepoint online - copying List
Hi,
I am new to Sharepoint, created a sharepoint list which i am using for Powerapps, is there a way i can create a copy of this list, some thing like save as?
Also, how do i export the list schema from one site to another, ex: dev to test?
Thanks
Jeevan
- That way of saving list templates (lest's call it "classic") should be avoided and use PnP and Site Scripts instead. The command you need to make an export of you list is the following one: https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/get-pnpprovisioningtemplate?view=sharepoint-ps
To do the same with site scripts take a look at the following article...there you will find how to extrat the site script from a list and create a site design based on that site script: https://drewmadelung.com/powershell-for-sharepoint-site-designs-site-scripts/
8 Replies
- WinfredLiuBrass Contributor
Hi jk264
In SharePoint, you can save a list as template and create a new list from that template.
You can find more details https://support.office.com/en-us/article/manage-list-templates-c3884ad1-bc49-44b8-b3d6-3bc6a01eb393
- That way of saving list templates (lest's call it "classic") should be avoided and use PnP and Site Scripts instead. The command you need to make an export of you list is the following one: https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/get-pnpprovisioningtemplate?view=sharepoint-ps
To do the same with site scripts take a look at the following article...there you will find how to extrat the site script from a list and create a site design based on that site script: https://drewmadelung.com/powershell-for-sharepoint-site-designs-site-scripts/- jk264Copper Contributor
Thanks jcgonzalezmartin
- If you mean to copy with the content, there is not way if you are thinking on creating exactly the same list with the data stored in other sites. What you can do is "export" list definition to a PnP Template or to a Site Script so you can re-use when you need...and to export the contents and import to another list write a PS script / piece of code that allow you to do it
- jk264Copper Contributor
Hi jcgonzalezmartin ,
I don't need the data from that list, basically , i am using the list as Data source for my Canvas based powerapps, so the list is in Dev environment, now i need to move that list definition to another site(Test/Prod), so users can test my power app. what are my options?
I have got below documentation from MS, which command do i need to use to export the definition so i can reuse.
https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-pnp/sharepoint-pnp-cmdlets?view=sharepoint-ps