Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

After Save, Populated Table Rows Are Hidden

Avatar

Level 9

I have a Livecycle form that connects to a MS Access database. Everything works as expected except for one issue. If I have more one table row unhidden and save the form, when I reopen it, all rows except the first row are hidden again. I verify the rows are visible when I save the form. Close it and when reopened, all but the first row are hidden again.

When the form originally opens blank, it connects to the database and there is only one row visible. The other 12 rows are hidden. I have a custom button that makes an additional row visible each time it is clicked. I can't find any script that is causing these rows to be hidden or invisible. Could the database script below be causing this? If I shut it off the problem stops only I don't know ow to fix it!



Form1.Subform1.EmployeeNo::exit - (JavaScript, client)


//HEADER SECTION


//Reset DB to first Record


//Walk thru all records to find highest file ID number


/*


var nMaxID =0;


//Reset DB to first record


var oDB = xfa.sourceSet.DataConnection1;


try{


oDB.first();


}


catch(e){


oDB.open();


oDB.first();


}


//walk thru all records to find latest file ID


while(!oDB.isEOF()){


if(xfa.record.DataConnection1.FileName.value > nMaxID)


  nMaxID = Number(xfa.record.DataConnection1.FileName.value);


oDB.next();


}


if((Subform1.FileName.rawValue ==null && Subform1.FileName.rawValue !="")){


Subform1.FileName.rawValue = nMaxID + 1;


    oDB.addNew();


Hide1.FileName1.rawValue = FileName.rawValue;


oDB.update();


Subform11.FileName.rawValue = Subform1.FileName.formattedValue;


this.resolveNode("OrderDate").rawValue = util.printd("yyyy-mm-dd", new Date());


}


else {


Subform1.FileName.rawValue = Subform1.FileName.rawValue;


}



1 Accepted Solution

Avatar

Correct answer by
Level 7

Could you add a doc::ready event that displays the rows if they have something inside?


var stopPlayingHideAndSeek = xfa.resolveNodes(tblStuff.Row1[*]);



for (var i = 0; i<stopPlayingHideAndSeek.length; i++) if (!stopPlayingHideAndSeek.item(i).tfFirstColumn.isNull) stopPlayingHideAndSeek.item(i).presence = "visible";




edit: fixed code typos

View solution in original post

2 Replies

Avatar

Correct answer by
Level 7

Could you add a doc::ready event that displays the rows if they have something inside?


var stopPlayingHideAndSeek = xfa.resolveNodes(tblStuff.Row1[*]);



for (var i = 0; i<stopPlayingHideAndSeek.length; i++) if (!stopPlayingHideAndSeek.item(i).tfFirstColumn.isNull) stopPlayingHideAndSeek.item(i).presence = "visible";




edit: fixed code typos