Forum Discussion
List items don't copy when I use PnP Provisioning Engine
- Sep 14, 2023
Hi Pavel2235 ,
I recently had issues like that.
It seems like this: If you export list elements using the config file, then ALL properties of all fields are exported as datavalues... in order to import these items I had to remove the datavalues for "ContentType" and other internal columns. Then an import worked.
Btw: If you export a site template like thisGet-PnPSiteTemplate list.xml -Handlers Lists -ListsToExtract "MyList" Add-PnPDataRowsToSiteTemplate -Path .\list.xml -List "MyList"
then you don't get datavalue elements for internal columns (But that does not work well for files and attachmetns)
Best Regards,
Sven
ganeshsanap
Yes, I see DataRows like this
<pnp:DataRows UpdateBehavior="Overwrite">
<pnp:DataRow />
<pnp:DataRow />
</pnp:DataRows>
Pavel2235 oh ok. In that case the list items should have been created in new SharePoint list.
Do you get any error/warning while invoking site template?
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- Pavel2235Sep 14, 2023Brass Contributor
ganeshsanap
There was not any error/warning while invoking and after execution.
I tried to do the same on another List.
I created a new List "SimpleList" and followed the same steps.
Now it seems that the items have been transferred, but with empty values in the fields.
There were no any error/warning while invoking and after execution either.
By the way, I use Team Site. Maybe this can only be done on Communication Site?- SvenSieverdingSep 14, 2023Bronze Contributor
Hi Pavel2235 ,
I recently had issues like that.
It seems like this: If you export list elements using the config file, then ALL properties of all fields are exported as datavalues... in order to import these items I had to remove the datavalues for "ContentType" and other internal columns. Then an import worked.
Btw: If you export a site template like thisGet-PnPSiteTemplate list.xml -Handlers Lists -ListsToExtract "MyList" Add-PnPDataRowsToSiteTemplate -Path .\list.xml -List "MyList"
then you don't get datavalue elements for internal columns (But that does not work well for files and attachmetns)
Best Regards,
Sven- Pavel2235Sep 14, 2023Brass Contributor
SvenSieverding Thank you very much for your response!