2 Replies Latest reply on Jun 8, 2010 12:57 AM by lewis4242

    Index of subform issue

    lewis4242 Level 1

      I'm stuck on this and would really appreciate any help or advice anyone has.


      I've got a set of repeating tables and I'd like to show the index number for the current one.  The structure is like this:


      - Values [subform]

      - Table2

        - HeaderRow

         - costObjectKey [text field]

        - Row


      I want to show the index in the costObjectKey text field, so in the initialize event I've added the following script:


      xfa.host.messageBox( this.resolveNode("$.parent.parent.parent").name + "[" + this.resolveNode("$.parent.parent.parent").index + "]" );

      this.rawValue = this.resolveNode("$.parent.parent.parent").name + "[" + this.resolveNode("$.parent.parent.parent").index + "]";


      The message box shows 0 then 1 (which is what I'd expect), but the text field shows 1 both times. 


      I've also tried:

      - putting the script in the calculate event

      - using this.parent.parent.parent.parent._Values.count;


      but I always just see 1.  What am I doing wrong?!


      Many thanks in advance,