Expand my Community achievements bar.

need to concateneate two data values for Repeatable subform field with XSD.


Level 2

I've a repeatable subform which is mapped with XSD file with sample XML also, in this subform for one field(Address) we need to add Concatenate two XML field values and the result should appear for that form field, till here working fine but when I am repeating the subform with Repeat subform with each data item I am getting same data for that particular field even though we have different values in XML.

xml file:

 <PrimaryAddr>1901 3RD AVENUE N </PrimaryAddr>
 <PhysicalAddr>DES MOINES, IA 50703</PhysicalAddr>

 <PrimaryAddr> 1312 4th avenue</PrimaryAddr>
 <PhysicalAddr>DES,IA 2045 </PhysicalAddr>


Script I've written:

var primaryAddr = resolveNode("$record.Data.Individual.PrimaryAddr").value;
var physicalAddr= resolveNode("$record.Data.Individual.PhysicalAddr").value;
this.resolveNode("$").rawValue = primaryAddr+ "\n" +physicalAddr ;

 for 1st subform i was getting perfect values like:

Address: 1901 3RD AVENUE N DES MOINES, IA 50703

but for second form also i was getting the same value instead getting:

Address: 1312 4th avenue DES,IA 2045.


Any solution please.

0 Replies