Wrong column order inside the content type when using list column inside a site template
I have created a sub site which got an issue tracking list inside it. Now the list contains 5 site columns, and one list column of type lookup.

Then I ordered the columns inside the content type so that the list column lookup will be second, then I saved the sub site as a template.

After that I created a new sub site based on the template,, and I checked the column order inside the content type , but unfortunately I found that the lookup list column will be last in the order instead of being second?

So can anyone advice what is the problem and what might be causing this , seems SP will place any list column at the end of the order regardless the order inside the site template? Thanks

May 28th, 2015 11:41am

Yes, i believe so. It's all down to the way that the site is built by the template. It's not perfect and does miss some things.
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2015 11:50am

Yes, i believe so. It's all down to the way that the site is built by the template. It's not perfect and does miss some things.
so how i can preserve the original order inside the template ?? as i want to create a template to allow end users to be able to create sub sites,, but it will be hard to inform the end users to modify the order after creating the sub site...
May 28th, 2015 11:57am

As far as I know it's not practical. You can crack open the WSP and add code to move the columns to the right place. Or you can use post creation PowerShell scripts to re-order the columns.
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2015 11:59am

As far as I know it's not practical. You can crack open the WSP and add code to move the columns to the right place. Or you can use post creation PowerShell scripts to re-order the columns.

what do you mean exactly that it is not practical ? ?? are you talking about allowing end users to create sub site based on templates ? Or you are talking about reordering the columns ?
May 28th, 2015 12:02pm

Hi,

Based on your description, column order is wrong inside the content type in a site template in SharePoint 2013.

In addition to Alex, you could re-order the columns by PowerShell scripts.

The function of the PowerShell below is to hide or reorder fields in a content type. You could adjust the site Url, the list name, the content type names and the reordered fields.

$siteURL = "http://dev.rainerj.local/sites/ee"

$contentType = "Issue"

$newFieldOrder = @("AssignedTo","TaskDueDate","Title","Comment","V3Comments","Priority","IssueStatus","RelatedIssues")

$web = Get-SPWeb $siteURL 

$list = $web.Lists["EEReorderFields"]

$ct = $list.ContentTypes[$contentType] 

$ct.FieldLinks["Category"].Hidden = $true

$ct.FieldLinks.Reorder($newFieldOrder)

$ct.Update()

Best regards,

Sara Fan

Free Windows Admin Tool Kit Click here and download it now
May 29th, 2015 8:18am

Hi,

Based on your description, column order is wrong inside the content type in a site template in SharePoint 2013.

In addition to Alex, you could re-order the columns by PowerShell scripts.

The function of the PowerShell below is to hide or reorder fields in a content type. You could adjust the site Url, the list name, the content type names and the reordered fields.

$siteURL = "http://dev.rainerj.local/sites/ee"

$contentType = "Issue"

$newFieldOrder = @("AssignedTo","TaskDueDate","Title","Comment","V3Comments","Priority","IssueStatus","RelatedIssues")

$web = Get-SPWeb $siteURL 

$list = $web.Lists["EEReorderFields"]

$ct = $list.ContentTypes[$contentType] 

$ct.FieldLinks["Category"].Hidden = $true

$ct.FieldLinks.Reorder($newFieldOrder)

$ct.Update()

Best regards,

Sa

May 29th, 2015 9:51am

Hi,

You could installed the latest CU for SharePoint 2013 to check if it can work. 

The article below is about SharePoint Updates.

https://technet.microsoft.com/en-us/library/dn789211(v=office.14).aspx 

If it still cannot work, you could run the script to reorder the column for the sub sites using template.

Best regards,

Sara Fan

Free Windows Admin Tool Kit Click here and download it now
June 5th, 2015 10:44am

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

Other recent topics Other recent topics