Hello dear livecycle fans!
I think that I looked everywhere for my rather simple question. Here it is:
I have a table with a header row and 1 row and a New Row button (which adds a new row to the table) BUT I want that button to validate the last row (to check if everything is fullfilled). It may also validate all rows, doesn't really matter.
My code looks like this:
var valid = true;
for (var i=1; i < Table1.Row.instanceManager.count; i++)
{
if (form1.page1.tabform.Table1.Row(i).field.rawValue == null || form1.page1.tabform.Table1.Row(i).field.rawValue.length == 0); {
xfa.host.messageBox("You are missing a field!");
valid=false; }
}
Of course when the valid = true it adds new row. However - this validation doesn't work 
why is that? Would you be so kind and help me out with one. The code looks simple and straightforward and I really don't know what I'm doing wrong.
Thank you! PS. wow this post editor is really messed up on Opera