Forum Discussion
Nigel Witherdin
Mar 07, 2017Iron Contributor
Error Provisioning a site containing Lookup column using PnP Provisioning Engine
Having an issue trying to use the PnP Provisioning Engine PowerShell cmdlets to template a site that contains Lookup columns. The site is an O365 site, and the commands I am using are: Connect-S...
paulpascha
Mar 07, 2017Bronze Contributor
I think the problem here is that the Field is being created without the List the lookup is referencing being available. There have been issues around this in the past, see the following issue in PnP repo for example:
https://github.com/SharePoint/PnP/issues/906
There seem to be more issues popping up recently around lookup fields. There is also this conversation describing the same issue:
I did some testing and I am able to reproduce your issue. I did the following basic steps
- Create Team Site "A" and "B"
- In Team Site "A" create List "My lookup list"
- In Team Site "A" create Field "My Lookup field" referencing "My lookup list"
- Save Team Site "A" as template using Get-PnPProvisioningTemplate
- Apply template to Team Site "B" using Apply-PnPProvisioningTemplate
I've submitted an issue in PnP here:
https://github.com/SharePoint/PnP-Sites-Core/issues/1105
Nigel Witherdin
Mar 10, 2017Iron Contributor
Thanks for the reply Paul - lets see what happens.