Moving subform instances to another subform

Avatar

23-09-2008

Hello. I need help!



Is it possible to move a subform instance to another subform?



I have created a form. Page 3 is a flowed subform. I have 4 subforms on Page 3. All are repeatable and flowed. I have named these subforms A, B, C, and D.



I have created a button in SubformD in order to insert an instance of SubformA. I want to move that instance below SubformD.



My script is below. Am I doing this right? I feel that fundamentally I have missed a key function/method.



var oNewInstance = Page3.SubformA.instanceManager.insertInstance(1);

var nIndexFrom = oNewInstance.index;

var nIndexTo = Page3.SubformD.index + 1;

Page3.SubformA.instanceManager.moveInstance(nInedx From, nIndexTo);

xfa.form.recalculate(1);



I have also tried:



var oNewInstance = Page3.SubformA.instanceManager.insertInstance(1);

var nIndexFrom = oNewInstance.index;

var nIndexTo = this.parent.index + 1;

Page3.SubformA.instanceManager.moveInstance(nInedx From, nIndexTo);

xfa.form.recalculate(1);



Thank you so much for your help!



-AmberO

Replies

Avatar

Avatar

dgray_au

Avatar

dgray_au

dgray_au

19-08-2010

Hi Amber - i have asked a very similar question just recently - did

you ever find a solution to this problem?

How do you transfer a table row (instance) from table1 to table2??

Regards David