getting current row from repeating table .. next/previous functionality.

E

esebastian

OK i have searched and searched, the internet , this forum and nothing
has been helpful so far. I have an infopath form with a master/detail
repeating section on it. i have just put 2 buttons on the form, one
for <previous and one for >next, when i click previous i want the
selected item in the master repeating table to move up one row and
when i click next i want it to move down one row from where i
currently am positioned on the form. I figure i can do this with xpath
(unless anyone knows of a better way) but i can't get the current
selection, i've tried using current() like this:
XPathNavigator tempNavigator = navigator.SelectSingleNode("/
my:myFields/my:Survey/my:Inspection/my:InspectedAssets/
my:InspectedAssetGroup[my:ass_Name = current()]",
this.NamespaceManager);
but i just get the error: XsltContent is needed due to an
unrecognizable funtion (or something like that)
How on earth can i do this??: I am really frustrated with infopath i
haven't found one good thing about infopath (excuse my frustration!!)
 
Z

Zhang Haiguang

Just a note, as I know, you cannot use the current() function in xpath
directly, it is used in xslt generally.
 
E

esebastian

I did not know that about the current() function.. The way i've been
getting around this is probably not a great way to do it but i can't
figure out anyother way. I have a unique identifier in each row so i
just use an xpath to get the nodes that are associated with the unique
identifier and go from there. There has to be a better way than this
though?!?!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top