Multiple elements with same name in a Record

We are running B2b 4.0.2 on Solaris and have inherited some
webMethods code from a group. While going through the
records I have noticed that some records have multiple
fields/elements with same names. For example

Record A
x1 (First)
x2 (First)
x1 (Second)
x2 (Second)

It does’nt seem that B2B stops one from creating multiple
elements with same name in a record.

I can access these elements (same named) in java services
using .first or visually through the pipeline editor. But
how or if we can access these elements in DSP/templates…?

For example how’d one access x1(Second) or x2(second) in a

Thanks much.

just curious to know, how will duplicate fields in a record
be helpful for you?
I thought it is a bug in WM.

As stated earlier, it’s some code that we have inherited
from another group. Offcourse the value of having multiple
elements with same names in a record does’nt seem very high.

You might check to see if at run-time that two different
fields with the same name actually exist in one of the
records. I haven’t checked myself but my expectation is that
there would be only one, and that mappings to a second field of the same name actually overwrites the value of the first.

Please let us know what you find!

Well I create a simple Record with two elements having same name but different values. At run time both elements in the record exist with different (assigned) values.

I’d assume that’s why we have the first(String) and
next(String) methods in the IDataCursor Object

So again, is it possible to access these elements with same names in a record via dsp/templates?