Yes D it is in the same group as C and field A is unique.
Many thanks...
> Like Adam said, you can do this without code, so you may want to consider this.
>
[quoted text clipped - 13 lines]
> >
> > Does anyone know any examples or ideas ?
I don't have code at hand for this, but it shouldn't be difficult to
implement. Here is what you can do...
Look into the Source object on the event object (eventObj.Source) that is
being passed to the OnAfterChange event handler for field C. This will enable
you to get to the value of field C (which should be equal to field A) as well
as field C itself. Then you need to retrieve the parent of field C and use a
selectSingleNode on the parent to get to field D, which has the same parent
as field C. You can then use a filter in an XPath expression on group 1 to
get to field A. Once you have field A, navigate to its parent, and then use a
selectSingleNode on the parent to get to field B and its value. Note: It
should also be possible to use 1 XPath expression to get immediately to field
B and its value. Set the value of field D to the value of field B and you're
done.
---
S.Y.M. Wong-A-Ton
> Yes D it is in the same group as C and field A is unique.
> Many thanks...
[quoted text clipped - 16 lines]
> > >
> > > Does anyone know any examples or ideas ?
S.Y.M. Wong-A-Ton - 04 Mar 2006 15:28 GMT
For those of you who need a visual sample on how this is done, I've posted a
"recipe" (=solution) on how to programmatically retrieve the value of another
field in the same row of a repeating table using JScript, here:
http://enterprise-solutions.swits.net/infopath/retrieve-field-value-same-row-rep
eating-table.htm
You can easily convert the code to C# by replacing "XDocument" with
"thisXDocument", "var" with "string", and "eventObj" with "e".
---
S.Y.M. Wong-A-Ton
> I don't have code at hand for this, but it shouldn't be difficult to
> implement. Here is what you can do...
[quoted text clipped - 33 lines]
> > > >
> > > > Does anyone know any examples or ideas ?