InfoPath fix in SharePoint

Posted 3 March 2010 12:00 AM by Gabriel Karawani, Director @ ClearPeople

Here’s a simple, although tedious, fix to a SharePoint InfoPath problem I came across while working at a client site. 

I began to notice that when publishing to any of the organisations three servers, if I add a new field to a form, or even modify the schema in the slightest, SharePoint ‘loses’ the content of the cells. After looking into the problem a bit, it seemed that the cause is that site columns become duplicated during the publishing of an Infopath Form to Forms Services using the InfoPath Publishing Wizard. 

The best way to handle this problem is to use Sharepoint Manager 2007 to identify duplicated site and list columns for the Infopath Form list. The columns being used by a published Infopath form can be identified by opening the Manifest.xsf for the Infopath form and comparing the columnId values to the Id values obtained by using Sharepoint Manager 2007...see, not too bad! 

From here, you need to delete the duplicated site columns using the SharePoint site column administration web page. And also delete the duplicated list columns on the Infopath Form list using Powershell. Just make sure that all the read only columns are set to ‘false’. For my specific problem, I used the following Powershell: 

function Delete_SPFields_From_SPList_Forced([string] $ServerName, [string] $ListName, [string] $FieldGUID){ $spsite = new-object Microsoft.Sharepoint.SPSite($ServerName + $SiteCollectionName); # Open A Subsite Of The Site Collection. $web = $spsite.RootWeb; $list = $web.Lists[$ListName]; $fieldCollection = $list.Fields; $guid = new-object System.Guid($FieldGUID); $field = $fieldCollection[$guid]; Write-Host “Removing $field $FieldGUID from $Web $ListName” $field.ReadOnlyField = $false; $field.Update(); $fieldCollection.Delete($field.InternalName); $spsite.Dispose(); } 

To delete the following fields: Claim Date 8b4ddc90-5190-4235-bda4-b46ca6c061b1Claim Grand Total 64a160d0-ee6d-4d8f-b383-e5eaf11ecc6fClaim No 83d5c76c-4520-4045-a819-b47bac301e95Claim Status 1db7b23f-e971-447b-b47f-59d9dc6d143cClaimant Name f004b61e-8cea-4fdc-a415-43a42097f751Mdr StaffNo 1f26b5b5-0b71-4ea4-94ee-77ed5ded220c 

And all was then good! Useful references during the trouble-shooting.

If this helped, let us know!


Add your comment





intranet Modern SharePoint teamwork employee engagement digital workspace SharePoint JavaScript Windows Azure Digital Transformation staff satisfaction productivity Microsoft Teams Office 365 Yammer cms content management system agile GDPR Microsoft Graph collaboration Microsoft sharepoint 2016 upgrade migration SharePoint Online 2016 Tech Trends Digital Disruption Context marketing marketing SharePoint 2010 SharePoint 2013 TFS Git security kentico Analytics jquery QA Quality Assurance testing content management websites Sitecore sitecore marketplace sitecore module cloud Microsoft Cloud Storage digital strategy technical consulting sitecore modules Experience database Sitecore 7 Sitecore 8 support account management customer experience Data Storage cms integration front end front end development prototype Cloud Storage StorSimple Front-end Development Layout SharePoint 2013 colour palette UI design website design log viewer sitecore cms website Azure big data business-critical sharepoint accessibility android apple chrome clear people clearpeople debug emulator ios mobile testing opera resize adobe desktop flash ie10 internet explorer 10 metro windows 8 bcsp Advanced System Reporter reporting framework ControlMode form control master page placeholder publishing console SharePoint 2007 SharePoint error search search results search values software testing testing scenario audit content information architecture retention schedules PowerShell QuickLaunch scripts SharePoint server 2010 business solutions metalogix replication replicator storagepoint stena technet UK Technet picture library slideshow web part RTM released to manufacturing caml caml query MOSS 2007 query infopath