We have a bugtracking system based on Sharepoint+Infopath technologies.

Infopath Forms have a few copies for different AD groups, so every employee can edit its own fields, depending on Active Directory user group:



After stsadm export operation, “Status” field disappears. So the form has this field, but sharepoint stops to show it in list Settings and list Views.


–  Republish Infopath form in Sharepoint Designer(column will appear, but with empty values).

– Refresh all list items. After refresh values returns to field.

You can do it programmatically by example using this code:

using (SPSite site = new SPSite("http://server/webName "))
using (SPWeb web = site.OpenWeb())
SPList list = web.GetList("http://server/webname/libName/");
foreach (SPListItem item in list.Items)
Console.Write("Updating " + item.ID.ToString());
Console.WriteLine(".. Ok.");
catch (Exception ex)

or if You prefer Powershell:

$web = Get-SPWeb -identity "http://server/webName"
$list = $web.Lists["listName"]
$list.Items | ForEach-Object { Write-Host "Updating " $_.Name; $_.SystemUpdate(); }

p.s.: If there were some User Views that used the “problem field”,  they should be recreated manually.

Click below to expand comments form..