Your practice sounds like good practice to me, Nigel.

I usually deliver my code solutions via a pure CSOM console app. It's a
little more  work but I've had consistent success creating a standard list
and then updating the settings as required.

On Fri, 10 Mar 2017 at 5:33 am, Nigel Witherdin <nigel_wither...@hotmail.com>
wrote:

> Thanks sutha and John - I guess I have to play with it a bit more!
>
> It's frustrating as there are bugs listed as completed in the project from
> a few years ago re: the engine needing to create lists used by lookup cols
> prior to creating the fields.
>
> Maybe it's because my lookups are also site cols applied via content
> types. Maybe I should change that design practice
>
> Sent from my iPhone
>
> On 9 Mar 2017, at 10:17 pm, John Liu <john-...@outlook.com> wrote:
>
>
>
> In my experience with PnP scripts – it’s tricky with lookup lists.
>
>
>
> You want to do pretty much what you would do manually – create list first,
> then add the lookup, then add the site/list content type to that list.
>
>
>
> I find that I sometimes need to split the template into two pieces – one
> that creates lists with no content type.  And Fields that points to those
> lists.
>
>
>
> Then I run apply a second time to apply the entire template again – and
> since PnP provisioning template is additive, it gets the job done.
>
>
>
> But it’s a lot of trial and error.  Makes me hate lookup fields a lot.
>
>
>
> jliu
>
>
>
> *From: *ozmoss-requ...@ozmoss.com
> *Sent: *Wednesday, 8 March 2017 1:09 PM
> *To: *ozmoss@ozmoss.com
> *Subject: *ozmoss Digest, Vol 74, Issue 3
>
>
>
> Send ozmoss mailing list submissions to
>         ozmoss@ozmoss.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
> or, via email, send a message with subject or body 'help' to
>         ozmoss-requ...@ozmoss.com
>
> You can reach the person managing the list at
>         ozmoss-ow...@ozmoss.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ozmoss digest..."
>
>
> Today's Topics:
>
>    1. PnP Provisioning Engine - Issue with Lookup Field
>       (Nigel Witherdin)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 8 Mar 2017 01:53:09 +0000
> From: Nigel Witherdin <nigel_wither...@hotmail.com>
> Subject: PnP Provisioning Engine - Issue with Lookup Field
> To: OzMoss <ozmoss@ozmoss.com>
> Message-ID:
>         <
> by2pr01mb175128a544c654455479d92c8f...@by2pr01mb1751.prod.exchangelabs.com
> >
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi All,
>
>
> 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-SPOnline "https://scentregroup.sharepoint.com/sites/scgpmo";
>
> Get-PnPProvisioningTemplate -Out c:\temp\pmo.xml -PersistBrandingFiles
> -Handlers Lists, ContentTypes, Fields, Files, Navigation, Pages,
> RegionalSettings, SiteSecurity, TermGroups, Workflows
>
> Connect-SPOnline "https://scentregroup.sharepoint.com/sites/pmo_trial";
> Apply-PnPProvisioningTemplate -Path c:\temp\pmo.xml -Handlers Lists,
> ContentTypes, Fields, Files, Navigation, Pages, RegionalSettings,
> SiteSecurity, TermGroups, Workflows
>
>
>
> The "Apply-PnPProvisioningTemplate" fails with the error:
>
>
> Apply-PnPProvisioningTemplate : The field was found invalid:
> {{listid:PriorLookUpStratAlign1}
>
>
>
> I believe the line in the pmo.xml file that is causing the issue is the
> first (of a few) lookup fields. I understand that the engine is using a
> token to represent the list id, which should be replaced with an actual
> list id when the list on the new site is actually created
>
>
> <Field Type="Lookup"
> DisplayName="SCG_PMO_PriorityStrategicAlignment:Score1"
> List="{{listid:PriorLookUpStratAlign1}}"
> WebId="df9b6d5e-4f8b-4abe-99f9-1776e3928e22" ShowField="Score1"
> FieldRef="b1b6ed05-a2e1-4699-b3c8-12a1838c44ef"
> UnlimitedLengthInDocumentLibrary="FALSE" Group="SCG PMO"
> ID="{656200e0-d1ad-44f8-8c1a-e83a433f46b1}"
> SourceID="{df9b6d5e-4f8b-4abe-99f9-1776e3928e22}"
> StaticName="SCG_PMO_PriorityStrategicAlignment_x003a_Score1"
> Name="SCG_PMO_PriorityStrategicAlignment_x003A_Score1" ReadOnly="TRUE" />
>
>
> Dont really understand why the "WebId" parameter is not also using some
> sort of token replacement logic?
>
>
> Has anyone used the engine to template sites including lookup fields? If
> so, can you offer any advice as to where I am going wrong?
>
>
> I have also attached the full pmo.xml file in case that helps
>
>
> Thanks!
>
>
> Nigel
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://prdlxvm0001.codify.net/pipermail/ozmoss/attachments/20170308/8abeefd3/attachment.html
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: pmo.xml
> Type: text/xml
> Size: 576123 bytes
> Desc: pmo.xml
> Url :
> http://prdlxvm0001.codify.net/pipermail/ozmoss/attachments/20170308/8abeefd3/attachment.xml
>
> ------------------------------
>
> _______________________________________________
> ozmoss mailing list
> ozmoss@ozmoss.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
>
>
> End of ozmoss Digest, Vol 74, Issue 3
> *************************************
>
>
>
> _______________________________________________
> Sponsored by Infotext - Amazing Search for Microsoft SharePoint -
> http://www.infotext.com/
> ozmoss mailing list
> ozmoss@ozmoss.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
>
> _______________________________________________
> Sponsored by Infotext - Amazing Search for Microsoft SharePoint -
> http://www.infotext.com/
> ozmoss mailing list
> ozmoss@ozmoss.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
_______________________________________________
Sponsored by Infotext - Amazing Search for Microsoft SharePoint - 
http://www.infotext.com/
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to