Update a Forms Library field - InfoPath Dev Sign in | Join | Help in SharePoint Integration InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » SharePoint Integration » Update a Forms Library field Update a Forms Library field Last post 12-30-2008 12:36 AM by swathip. 5 replies. Page 1 of 1 (6 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 12-19-2008 12:23 PM guptasourav Joined on 09-10-2008 Posts 46 Update a Forms Library field Reply Contact HiI am trying to update a field in my Forms library. It works fine, do not give any error but does not update the field. I am also an administrator on the server with full access This is my code :using (SPSite site = new SPSite("http://server:10746")) { using (SPWeb web = site.OpenWeb()) { SPList surveylist = web.Lists[<Forms Library>]; //Name of the field as in list settings string ColumnName = GetInternalName("Location Sequence", surveylist); string camlQuery = "<Where><Eq><FieldRef Name='" + ColumnName + "'/><Value Type='Integer'>"+ currentLocationSequence +"</Value></Eq></Where>"; SPQuery sharepointQuery = new SPQuery(); sharepointQuery.Query = camlQuery; SPListItemCollection surveys = surveylist.GetItems(sharepointQuery); foreach (SPListItem survey in surveys) { survey["Survey Status"] = 7; survey.Update(); //surveylist.Update(); } } }This code works fine without any error but does not update the value.Any suggestion or help is appreciated ThanksSourav Filed under: Programming, SharePoint library, forms services, web service, browser enabled, infopath 2007, MOSS 2007, update list item, iterate 12-19-2008 01:53 PM In reply to guptasourav Joined on 09-10-2008 Posts 46 Re: Update a Forms Library field Mark as Not AnswerMark as Answer... Reply Contact Hi,As I am using a Forms Library and try to change the value of a promoted property column, I also tried survey.Properties["{94c0bb55-0e52-4133-b242-882b2443de6c}"] = 7; in the above code but still no luck. ThanksSourav 12-19-2008 09:34 PM In reply to Shiva Joined on 04-15-2005 India Posts 694 Re: Update a Forms Library field Mark as Not AnswerMark as Answer... Reply Contact Hello, Check out this link, http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitemcollection.aspx Shiva / http://www.ggktech.com 12-22-2008 03:16 PM In reply to guptasourav Joined on 09-10-2008 Posts 46 Re: Update a Forms Library field Mark as Not AnswerMark as Answer... Reply Contact Thnaks Shiva !I am also doing the same thing as in the link u reffered. I think its a limitation with promotion properties in an infopath forms library because when I try to update the any column which is not promoted column, same code works fine.Seems some error or limitation with Forms Library in MOSS. ThanksSourav 12-30-2008 12:04 AM In reply to Shiva Joined on 04-15-2005 India Posts 694 Re: Update a Forms Library field Mark as Not AnswerMark as Answer... Reply Contact Hello, Thank for your reply. Did you exceed the limitation of promoted list properties in your form? Can you give more detail on your error message?Hello, Go through the below link to get more information on Xdocument, http://msdn.microsoft.com/en-us/library/bb229879.aspx Shiva / http://www.ggktech.com 12-30-2008 12:36 AM In reply to swathip Joined on 10-30-2007 India Posts 487 Re: Update a Forms Library field Mark as Not AnswerMark as Answer... Reply Contact Hi, As of my knowledge there is a limit for the promoted properties in the SharePoint library. I do not know the exact number but it will accept around 75 to 80 columns. Swathipwww.ggktech.com Page 1 of 1 (6 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
Hi,
As I am using a Forms Library and try to change the value of a promoted property column, I also tried
survey.Properties["{94c0bb55-0e52-4133-b242-882b2443de6c}"] = 7;
in the above code but still no luck.
Hello,
Check out this link,
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitemcollection.aspx
Thnaks Shiva !
I am also doing the same thing as in the link u reffered. I think its a limitation with promotion properties in an infopath forms library because when I try to update the any column which is not promoted column, same code works fine.
Seems some error or limitation with Forms Library in MOSS.
Thank for your reply. Did you exceed the limitation of promoted list properties in your form? Can you give more detail on your error message?Hello,
Go through the below link to get more information on Xdocument,
http://msdn.microsoft.com/en-us/library/bb229879.aspx
As of my knowledge there is a limit for the promoted properties in the SharePoint library. I do not know the exact number but it will accept around 75 to 80 columns.