Getting values from Repeating Table

G

Gaurav Upadhyay

Hi Everybody,
I am using Infopath 2003 SP2.I have a form with repeating table.I want
to get values from repeating table into some variables so that I can
apply business rules and save data to database accordingly.Please let
me know if I could do that.
Regards
 
G

Gaurav Upadhyay

Hi S.Y.M,

Thanks a lot for the update. I had a look at the article and it was
great.But since I am a novice in Infopath, it would be really nice if
you could post a small code for retrieving values from a two row
repeating table.
Thanks in advance.

Regards
 
G

Gaurav Upadhyay

Hi S.Y.M

Thanks a lot for the update. The code is really great and it works too.
It has solved a lot of problems for me.Once again thnaks.

Regards

S.Y.M. Wong-A-Ton said:
There are countless samples online. Search this newsgroup on "repeating table
selectsinglenode" to find sample code on how to do this. Take a look at this
link, for example:
http://groups.google.com/group/micr...lectsinglenode&rnum=10&hl=en#fc77e6b6e21cf593

And modify it to suit your needs like this:

var oRow1 =
XDocument.DOM.selectSingleNode("/my:myFields/my:group1/my:group2[1]");
var valueFromFirstRow = oRow1.selectSingleNode("my:field1").text;
var oRow2 =
XDocument.DOM.selectSingleNode("/my:myFields/my:group1/my:group2[2]");
var valueFromSecondRow = oRow2.selectSingleNode("my:field1").text;
---
S.Y.M. Wong-A-Ton


Gaurav Upadhyay said:
Hi S.Y.M,

Thanks a lot for the update. I had a look at the article and it was
great.But since I am a novice in Infopath, it would be really nice if
you could post a small code for retrieving values from a two row
repeating table.
Thanks in advance.

Regards
 
Top