Move Rows Up or Down triggering Validation Error in Livecycle Table

Avatar

Avatar

dsciore

Avatar

dsciore

dsciore

26-01-2016

Hello Niall,

Your work is incredibly helpful. I am stumped with a problem. I have inserted two buttons within expandable tables to allow users to move rows up or down.

Works well at first, then begins to trigger a validation error when the use clicks up or down. The error says" Enter name cannot be left blank." However, there is no validation requested anywhere in the document. The row still moves, after user clicks ok.  I have narrowed the problem to the buttons, and not the table rows.

Here is the script for the buttons:

Up

if(Row1.index != 0)

{

var nIndexFrom = Row1.index;

var nIndexTo = Row1.index - 1;

Row1.instanceManager.moveInstance(nIndexFrom, nIndexTo);

xfa.form.recalculate(1);

}

and Down

var nIndex = Row1.index;

if((nIndex + 1) < Row1.instanceManager.count)

{

var nIndexFrom = nIndex;

var nIndexTo = nIndex + 1;

Row1.instanceManager.moveInstance(nIndexFrom, nIndexTo);

xfa.form.recalculate(1);

}

Any thoughts as to why this would happen?  Removing buttons removes error, but also function. Turning off error windows removes error boxes, but I don't want to do that in case I put validation somewhere in the document.

Your help is appreciated.

Thank you.

Don

Accepted Solutions (0)

Answers (0)