Skip navigation
Currently Being Moderated

Move data from row to row

Jul 20, 2012 8:30 AM

Hi,

 

I am using the script below(from Niall,s sample) for a button on click event, to move data from a row to another row.

In the subform AllSub I include 2 subforms(SubformA and SubformB).

Is it possible to move the data from SubformB only, SubformA data must remain the same as is!

The script below moves data from both Subforms.

 

Thanks

 

 

var nIndex =AllSub.index; 

if ((nIndex + 1) < _AllSub.count)

{  

    var nIndexFrom = nIndex;   

    var nIndexTo = nIndex + 1; 

    _AllSub.moveInstance(nIndexFrom, nIndexTo);   

}  

else

{  

    xfa.host.beep("3");

    this.caption.font.fill.color.value = "255,0,0";

 
Replies
  • Currently Being Moderated
    Jul 22, 2012 1:25 PM   in reply to mmgiath

    Hi,

     

    I would say, probably not, based on your description and the script.

     

    The script is moving the repeating object AllSub. This will move all of the contents (SubformA AND SubformB) of the particular instance of AllSub. You may need to make SubformA and SubformB the repeating objects and script from there.

     

    Good luck,

     

    Niall

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 23, 2012 12:49 PM   in reply to mmgiath

    Hi,

     

    I don't belive you can using moveInstance() method, as this is for repeating instances, where there is more than one instance.

     

    You can "move" objects around the form by accessing the x/y coordinates. But it is a bit clunky and uses buttons. See an example here: http://assure.ly/uPXhPk.

     

    So overall, based on your original description, I would say no.

     

    Niall

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points