Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Restore Hidden Rows

Avatar

Former Community Member
I have a dynamic table populated via XML. Is there a way that I can "Hide" all rows where "Qty" == null and if the user wanted to, restore all those hidden rows with "visible"?



One button = hide all rows without an entry in "Qty"



Second button = make visible all rows that were hidden via the above button.



Any help on this subject would be greatly appreciated.



This is what I already have, and it works ONLY for the first row of the section.



if (TableSubForm.Table.Row2.ProductRow1.Cell2.rawValue == null) {

TableSubForm.Table.Row2.ProductRow1.presence = "hidden";

}

else {

TableSubForm.Table.Row2.ProductRow1.presence = "visible";

}
2 Replies

Avatar

Former Community Member
Yes ...you will have to look at each row individually then check your Qty to see its value. Note that the occurance number of each of the fields will be on the row subform. So your code shoudl look something like this:



for(i=0; i< TableSubForm.Table.Row2.ProductRow1.count;i+){

if (xfa.resolveNode("TableSubForm.Table.Row2.ProductRow1[" + i + "]").Cell2.rawValue == null) {

xfa.resolveNode("TableSubForm.Table.Row2.ProductRow1[" + i + "]").presence = "hidden";

}

else {

xfa.resolveNode("TableSubForm.Table.Row2.ProductRow1[" + i + "]").presence = "visible";

}

Avatar

Former Community Member
Thank you for the answer. I have provided you with a link to a quick screen grab so that you can visualise what seems to be the problem.



Again, thanks for getting back to me so soon.



Regards,



Glenn



http://www.draegercanada.com/screengrab.jpg