Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

This.parent.index... What??

Avatar

Level 2

Still having trouble with this same form...

I have a button that adds a subform as well as a row to a table (the table is in a different subform.  I want the information that the user enters into the subform to populate into the table rows.  I'm on my 3rd day of trying to figure it out and my third solution.  I now have the script below, which only adds the information in the subform to the 3rd row (which is actually the 2nd row if you don't count the header row).  All of the other rows in the form stay blank.  Not.what.I.want!

 

xfa.resolveNode("form1.Subform8.Table5[0].Row2["

+this.parent.index+"].TextField40").rawValue=

this.rawValue;

What am I doing wrong?  I've never written in code or scripted or anything of that nature.   Please help me...

1 Reply

Avatar

Level 10

Hi,

Is it possible for you to add a link to your form,  I don't understand where the code you have posted is, I assume it is not in the button that adds the new subform instance, because this.parent would then refer to the parent of the button.  If it is in the calculate event of the field of the subform instance just added it might work depending on the structure of your form.

Regards

Bruce