.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

keep the value of previously entered record on Submit Action in Infopath

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :C#


I am using SharePoint 2010 list. I have customized a list form using the out of box functionality.

I have requirement that when user clicks on the “Submit” button, the form should preserve the field values so for the second record, user does not need to enter all the fields as some of the fields might be common for both the records.

To serve this purpose, in Button properties

·         I selected “Submit” as an Action


View Complete Post

More Related Resource Links

Infopath form using Visual Studio - How to bind repeating table on submit button click ?


Hello friends,

   I have created infopath form using Visual Studio 2008

Form have 3 dropdowns and one repeating table which is bound by Datasource ( List from sharepoint ).

whenever i select appropritae values from drop down, Repeating table gets bound as datasource for dropdown and repeating table are same.

I have done conditional formating for repeating table using repeating table properties.


My Question:


Now i included one submit button and i want when i click submit button it will check DropDown Values and if appropriate record matching these values found it will fill repeating table

How i achive this ? as i dont find how to bind repeating table on submit button.

Please help if anyone have answer.


Thanks and Regards,


Kapil Bhosale.




Populate Treeview upon entered criteria and page action without complete page posting on client side


1. I have a treeview on left side in a panel in my aspx page and I have a Text box and a Search button on the right panel. On entering a search criteria and clicking the Search button, I want to get the data needed for the treeview (FYI - I have a webservice call for that) and then populate the treeview completely but keep it collapsed to the root node.

  Each time I enter the search criteria and click the Search button, I don't want to post the entire page (and also don't like the page flicker), how can I achieve this? I know that in order to avoid complete postback upon Search button click, I can do so by client callback and get the data needed for the treeview, but in this case, I have to build the treeview nodes as table - row/cells and handle all the events and handlers myself, which I want to avoid (also means that I won't be able to take advantage of the inherent expand and collapse capabilities of the Treeview). On the other hand, if I use the OnTreeNodePopulate event handling of the Treeview control, using the C# script code on the aspx markup, it doesn't recognize the entered criteria in the Text box. So either way,

InfoPath Form: Encountered error while trying to submit the form from the browser

Hi,I have created a form in InfoPath, and i filled in the form in the browser. But there's an error apppeared when i tried to click on the submit button to submit the form. May i know is there ways for me to check what cause this error because i have no idea about this. "There has been an error while processing the form. There is an unclosed literal string. Line 1, position 543. System.Xml.XmlException: There is an unclosed literal string. Line 1, position 543. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr) at System.Xml.XmlTextReaderImpl.ParseAttributes() at System.Xml.XmlTextReaderImpl.ParseElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at Microsoft.Office.InfoPath.Server.Xml.InfoPathXmlDocument.Load(XmlReader reader) at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataObject.<>c__DisplayClass3.<.ctor>b__0() at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.Exception

Infopath Data Connections and Submit

We are in the process of shifting our draft system from SP 2007 to SP 2010 and we are re-visiting our Infopath forms service. Admin approved IP forms,  the templates emailed to our 12 remote 'offices' 12 Site collections -identical structure for remote locations 12 Remote user locations, never connected! ,fills in the form, selects own site, and emails back to office Custom button on form with rules reads 'selected site' and uses appropiate data connection to submit to correct Site Collection/Form Library. We are only using 1 site at the moment but obviously with 12 sites it becomes unmanagable, my thoughts;- Can we use a web service to act as an intermediary to point to correct library? Would a dataconnection library help?, or is the amount of work the same? ??? casey  

submit infopath 2003 form to a sharepoint list

hi, is it posible to add  an infopath 2003 form to a sharepoint list, not document library but a list. and can i create views from the infopath 2003 form?

InfoPath form web part stops the close on submit

I have successfully published HTML browser enabled InfoPath 2010 forms to form libraries in SharePoint 2010. Users can navigate to the libraries and click new docuiment and fill out and submit forms, and the behavior of submit is as programmed in the form namely I have a concat rule for form name and chose action after submit to close the form with a success message. The problem I am seeing is a little abstract so stay with me while I explain. I'm hosting a number links to web part pages with the infopath web part on them. I use a links web part to aggrigate about 16 forms links on a single page. Users can successfully click on a link, are migrated to the web part page that has the form displayed in the infopath web part and all is well till they click the submit (on the ribbon, or custom button or whatever) The form does successfully get saved into the form library, but the form does not close. I need to make this process very simple for users without any training expended on the process. I'd like to shift focus to the previous web page, or close the form or something dramatic visually to show the user that they have completed the form fill out, and allow them to fill another form. Codebehind examples gratefully accepted! /Robin    

How do I submit an attachment in an Infopath Form to a Sharepoint list?

I have already written code to submit my infopath data to my share point list, but now I need to find out how to submit an attachment to the same existing custom list in Share Point 2007.

How to return a specific field from the last record entered


I have two tables, Discrepancies and Actions that are linked by a field called JobNumber

What I need to do in a stored procedure is return a date field from the last record entered in the Actions table where the JobNumber is the same

The Actions tables primary key is an Identity field.

I'm trying to make a subquery but am stuck on the syntax.

Any help would be appreciated, this is just a bit beyond my skill set. Thanks.

submit infopath form to sharepoint library and email



how can i submit an infopath form to a SP library as well to the approvers email.

the email has to send to the manager's emailaddress that is automatically filled in the form.

i now how to submit to an email address but how can i use 1 submit button for both actions?


Submit InfoPath form to SharePoint Form Libraries on the Fly



I have a urgent requirement - Submitting InfoPath Form 2007 to SharePoint Form Libraries dynamically on the fly.   http://blogs.msdn.com/b/infopath/archive/2006/11/08/submitting-to-this-document-library.aspx

I followed the above link, able to submit new forms to the form libraries dynamically.  But when I edit the form and try to resubmit the form again to the same form library with the same file name it throws error. 

The given key was not present in the dictionary.

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.Office.InfoPath.Server.Util.ReadOnlyDictionary`2.System.Collections.Generic.IDictionary<K,V>.get_Item(K key)
at TIPTemplate.FormCode.FormEvents_Loading(Object sender, LoadingEventArgs e)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.FormEventsHost.<>c__DisplayClass6.<>c__DisplayClassa.<add_Loading>b__3()
at Microsoft.Office.InfoPath.Server.Util.DocumentReliability.InvokeBusinessLogic(Thunk thunk)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.FormEvent

I'm new and don't have a clue... Need to have user entered parameter with submit refresh my gridvi


Introduction; So... very new to VS2010 and C# and ASP.Net... great combo of I don't knows...

But want to learn and getting a great oppurtunity to do so...

I need help understanding and how to capature a parmeter on same page of grid that when it's entered and a submit button is clicked the grid re-displays based on the parmeter... so far if I set a default="xx" in the parmeter it works on page load but if I do not have a defualt or try to enter and submit nothing...

Here's the code:


<asp:Content ID="Content1" ContentPlaceHolderID="pageBody" runat="Server">
     <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
     <asp:Button ID="Button1" runat="server" Text="Button"
         onclick="Button1_Click1" />
     <br />
    <br />
    <asp:ObjectDataSource ID="AchBankTraceObjectDataSource" runat="server" OldValuesParameterFormatString="original_{0}"
       SortParameterName="sortExpression" SelectMethod="GetData" TypeName="Famis.DataLayer.FRS.VXACHBankTraceCollection">

create an infopath form that receive and submit data to sql server database in the same form



i want to create an infopath form that can receive the data out of the slq server database and edit the data in the database and then submit it.

here is what i did so far.

i created a data connection to a sql server database to SUBMIT the data.

also i created a data connection to the same sql server database to RECEIVE the data.

when i open the form the user and the user's details are already filled in the form, now i need to let the user edit the data in the fields or add a new data in a field and then the form need to be submitted to a temporary database to be checked first by an approver and after approval the form must be submitted to the real sql server database.

i tought about that the approver just need to click a button and the data will be submitted to the the real database.

both the temporary and the real database has the same tables and fields.

i just need to know how to edit and submit the data to the temporary later to the real database



How to submit an InfoPath form back to SharePoint?


Hallo Clayton,

another question:  if I work in filesystem, I can open a infopath form (.xsn) , fill it and save the result as data file (.xml).

Can I realize a similar behaviour with SPF in a form library:  the user opens a form (.xsn), fills in the data, and then press s submit button, so that the data file is stored somewhere in sharepoint.

I have tried this, but I cannot find a way to "submit" the data back to sharepoint (from the Infopath client).

Thank you!


Infopath 2010 submit problem



This is my 3rd post and I am newbie to Infopath 2010.

I have a question about 'submit' button on the form.

Right now I have a form with one dropdown, one textbox,  and 2 buttons which are <Run Query> and <Submit>

I have a SQL database table (ITEM) which has 4 columns; ItemNumber, Quantity, Location and Name.


Senario: A user is going to choose a location from dropdown menu that is populated by another table in the SQL database. He is also going to type in his name in the textbox.

When he clicks <Run Query>, the ITEM table that is in SQL displays with only two columns, ItemNumber and Quantity.

The table will have Item Numbers already filled in, but all of the quantity fields will be blank, so the when the user clicks <Run Query> it will display a list of Item Numers, and the user will fill in the quantities for those specific items.

After they are done filling in the quantities, the user will click the  <Submit> button.

When the user clicks the <Submit> button, I need all of the Item and Quantity data to populate the database, but I also need their location and name to go into every record that they submitted. So if there are 10 Items in the table, they will fill in quantities for those ten items, and the

Add new record to a sql table that has a foreign key relationship using infopath form



it's me again.

i want to know how can i add new records to a sql database table that has a foreign key relationship with another table using infopath form.

i have created a blank form based on database

i have all my fields and the "add new" button already in the form.

i have the username and the userid filled in automatically when the user opens the form.

when i fill in the form with new data and click submit. it gives me this error:

Field or group: BE_CODE
Error: Only integers allowed

this "BE_CODE" field has to be filled in the database table, it can not be null. but it must not be filled in by the user it self. and it is a repeating table so it can not be auto increment.

how can this field also be filled in the database table?

Submitting Infopath forms to a Sharepoint Library - how can I generate a unique name for each record


I have published an Infopath form to a Sharepoint Library. What is the best way to ensure the following:

1. have a name per saved form (I do have a name field which has a set certain amount of available names in it which I am currently using as the form name - coming from an XML file)
2. users can edit already submitted forms without changing the name of the saved form
3. Ensure that users who may create a new form which happens to have more or less the same data as a previously saved form don't end up overwriting the existing one and hence I end up loosing saved data?

Using the name field + allow overwrite will allow me to have a unique name for the form and allow it to be overwritten but if I create a new form with the same name and maybe just a few small differences I will overwrite the existing form which is what I don't want - someone may not realise that an existing form with the relevant information already exists and we could loose already saved information

Any advice would be greatly appreciated.


Infopath Form Submit Options



I would like to make a form read-only after it is submitted to a Form-library. How do we set this in the Form Template?. I am using Visual studio 2008 Infopath Form Built in Template.

One way is to make a copy of the Default view and create a new so that it is read-only view but how do I set up such that the default View shifts to REadonly after Form submission.

Any help is appreciated,



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend