Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

Avatar

Level 1

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:

<Individual>
 <PrimIDnumber>1123456788</PrimIDnumber>
 <PrimIDType>DL</PrimIDType>
 <PrimIDState>2222</PrimIDState>
 <PrimaryAddr>1901 3RD AVENUE N </PrimaryAddr>
 <PhysicalAddr>DES MOINES, IA 50703</PhysicalAddr>
</Individual>
<Individual>

   <PrimIDnumber>1122334455</PrimIDnumber>
 <PrimIDType>DL</PrimIDType>
 <PrimIDState>3333</PrimIDState>
 <PrimaryAddr> 1312 4th avenue</PrimaryAddr>
 <PhysicalAddr>DES,IA 2045 </PhysicalAddr>
</Individual>

 

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