Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / October 2007

Tip: Looking for answers? Try searching our database.

save data from repeating table when the form is saved

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Reetu - 19 Oct 2007 17:45 GMT
Hi All,

I have two drop down list boxes and a repeating table on the form.

The data in the repeating table is displayed form a web service. When I save
the form the data in the repeating table is not saved. I assume since I do
not have any fields bound to the table the form is not able to save the data.

Is there any way by which I can save the data from the repeating table when
the form is saved?

Thanks for your help.

Regards,
-Reetu
Reetu - 19 Oct 2007 18:16 GMT
Hi All,

One way I have found out right now is to read the data from webservice and
then
insert data in the repaeting table via managed code listed below. This way
the form will be able to store the data.  If there is any other way so that I
can avoid using code that would be great. I would appreciate your help.

// get a reference to the node the repeating table is bound to
IXMLDOMNode rowOne =
thisXDocument.DOM.selectSingleNode("//my:repeatingtable");
       
// Make a copy of the node by cloning it
IXMLDOMNode row = rowOne.cloneNode(true);

// set the new values of the row’s fields
row.selectSingleNode("my:field1").text = "new row field 1";
row.selectSingleNode("my:field2").text = "new row field 2";
row.selectSingleNode("my:field3").text = "new row field 3";

// append the cloned row to the parent node
IXMLDOMNode parent = thisXDocument.DOM.selectSingleNode("/my:myFields");
parent.insertBefore(row, rowOne);

Regards,
-Reetu

> Hi All,
>
[quoted text clipped - 11 lines]
> Regards,
> -Reetu
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.