Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Restore Hidden Rows

Not applicable
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
pguerett
Level 10
Level 10
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";

}
Not applicable
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