Site Template, local lookup column keeping reference to original
I have created a site with various lists. On the site I've used content types and site columns. One site column is local to the site and is of type lookup. i.e. looks up information in one of the lists on the site. The issue is I need this to be a template for creation of new sites like it. After saving out and using the template the lookup column doesn't work! It remains pulling data from the original list on the site the template was based on. Internally the WebID and ListID are set. Is there a way to have lookups work in site templates? i.e. lookup information from a list on the new site itself? I know site defs can do this but time is an issue and a site def would take much longer! Thanks
July 19th, 2010 11:30am

Hi, There is no good solution for this need since the list GUID will be a new value when you create a new site using this template. You just can change the reference of the lookup field again when you create a new site with this template. Hope it is helpful!Seven
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2010 1:16pm

Thanks for your reply. This issue make's site templates pointless in my opinion ! Fixing the lookup source is not easy using the UI. You can't alter the list afterall. All you can do is recreate the field BUT then this breaks the dataview webparts on a dashboard using the field in connections. I basically end up recreating the entire site. Site def it may have to be :(
July 20th, 2010 2:33pm

Hi, After my research and testing in my VPC, I found that the lookup field still be refer to the correct list not the original list even though the GUID of the list already changed. How did you found that your lookup field refers to the original list? Can you please check it again through clicking the lookup field with link in view properties page to see if it will be go to the correct list or original list? Hope it is helpful!Seven
Free Windows Admin Tool Kit Click here and download it now
July 21st, 2010 10:55am

Interesting!!! The site if for individual use. There is a list to store personal objectives. Other lists then have a field that reference this list as a lookup. Two reasons why I know it didn't work. 1. Another persons site references lookup values from my source list. i.e. they seen my objectives 2. Checked in SharePoint Manager. The ID for web and list are that of my site which was the site that was saved out as a template Only running SP1. Could that be it? Or maybe it's to do with me using a site column? Did you create the field directly on the list? (the site column is local to the new site being templated).
July 22nd, 2010 11:09am

Yep that's it. Just creating a field and adding to the list is updated accordingly on a new site made from the template. However using content types and site columns results in the issue I'm getting. Not ideal...!
Free Windows Admin Tool Kit Click here and download it now
July 22nd, 2010 11:18am

Changed to using normal fields and now the site template works. i.e. lookup column now looks up the correctly provisioned list. HOWEVER new issue: In the site to be templated I marked a title field as NOT REQUIRED and as HIDDEN for a particular list since it's not required. Checking the .stp all looks correct in the markup. <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Required="FALSE" DisplayName="Title" Hidden="TRUE"/> However sites created from the stp dont respect this and the title is shown and is marked as required. PROBLEM AFTER PROBLEM :(
July 22nd, 2010 3:42pm

Hi, How did you change the title field as default field in SharePoint? The site template has lots of limitation. I found a useful article to introduce the site template and site definition: http://my.advisor.com/doc/17614?open&p=2&pid= Hope it is helpful!Seven
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2010 10:44am

Used SharePoint Manager from CodePlex to change the title field. Great tool ! As I say the stp xml file looks like it's respected that setting as the markup is correct. However creating a site seems to not respect these xml attributes and it is set back to be a required, non hidden field.
July 23rd, 2010 12:19pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics