- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi,
Repeatable objects have a zero-based numbering system. So Row1 with 12 instances, would look like Row1[0], Row1[1], ... Row1[11].
So the following Javascript would move the row up:
if (Row1.index != 0)
{
var nIndexFrom = Row1.index;
var nIndexTo = Row1.index - 1;
_Row1.moveInstance(nIndexFrom, nIndexTo);
}
else
{
xfa.host.beep("3");
}
A similar script would move the row downwards. Note I have used Row1.index, you could also use this.parent.index if the button is in the row. If it is buried in subforms, you may need this.parent.parent.index, to get to the instance of the repeating object.
Hope that helps,
Niall