Hi,
I'm trying to hide a row inside a dynamic table if data in cell2 has "Old Statement".
If cell2 has the name "Old Statement". Hide that whole row.
My code only hides the 1st row.
if (statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry.Cell2.rawValue == "Old Statement")
{
statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry.presence = "hidden";
}
else
{
statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry.presence = "visible";
}
I'm new to Livecycle designer and would really appreciate the help.
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
If you put the following code into the calculate event of rwStatementEntry, it should work.
this.presence = Cell2.rawValue === "Old Statement" ? "hidden" : "visible";
Views
Replies
Total Likes
If you put the following code into the calculate event of rwStatementEntry, it should work.
this.presence = Cell2.rawValue === "Old Statement" ? "hidden" : "visible";
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @radzmar, after doing the hidding. I'm now struggling with sorting the same table by date descending.
var Cell1Array = new Array();
var Cell2Array = new Array();
var Cell3Array = new Array();
var Cell4Array = new Array();
var Cell5Array = new Array();
var Cell6Array = new Array();
var rowIM = xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry").instanceManager;
for (var i=0; i < rowIM.count; i++)
{
var Cell1 = xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry[" + i + "].Cell1").rawValue; Cell1Array.push(Cell1);
var Cell2 = xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry[" + i + "].Cell2").rawValue; Cell2Array.push(Cell2);
var Cell3 = xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry[" + i + "].Cell3").rawValue; Cell3Array.push(Cell3);
var Cell4 = xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry[" + i + "].Cell4").rawValue; Cell4Array.push(Cell4);
var Cell5 = xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry[" + i + "].Cell5").rawValue; Cell5Array.push(Cell5);
var Cell6 = xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry[" + i + "].Cell6").rawValue; Cell6Array.push(Cell6);
}
Cell1Array.sort();
Cell2Array.sort();
Cell3Array.sort();
Cell4Array.sort();
Cell5Array.sort();
Cell6Array.sort();
for (var i=0; i < rowIM.count; i++)
{
xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry[" + i + "].Cell1").rawValue = Cell1Array[i]; xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry[" + i + "].Cell2").rawValue = Cell2Array[i]; xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry[" + i + "].Cell3").rawValue = Cell3Array[i]; xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry[" + i + "].Cell4").rawValue = Cell4Array[i]; xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry[" + i + "].Cell5").rawValue = Cell5Array[i]; xfa.resolveNode("statementForm.sfStatementForm.sfStatementSummary.sfStatementEntries.tblstatementEntry.rwStatementEntry[" + i + "].Cell6").rawValue = Cell6Array[i];
}
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies