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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Iterate through XML

Avatar

Not applicable
I have a form that has a dataconnection with XSD. In my XML there can be more that one secondary owners and I need to display them all separated by commas. here is my code:



var str = "";



for(var i=0; i<$record.deliveringAccount.delSecondaryOwners.resolveNode"(delOwner[*]").length; i++){

str += $record.deliveringAccount.delSecondaryOwners.resolveNode("delOwner[i]").firstName.value + ",";

}

this.rawValue = str;



It does not work. What am I doing wrong here?
0 Replies