In the form linked below, I am trying to create a custom button script (Javascript) that will hide all rows that are currently shaded green (border.fill.color.value = "204, 255, 204") in two dynamic tables. The rows are shaded when the user selects "Green" from a drop-down object located in each row.
Thanks for your help with this.
https://acrobat.com/?d=hoXKsHVKALFdRwoS3Rnj7g
Solved! Go to Solution.
Views
Replies
Total Likes
Try this:
for (var a=0;a<LogoControls._ActionSubformA.count;a++){
for (var b=0;b<LogoControls.ActionSubformA.all.item(a).Table1._Row2.count;b++){
if (LogoControls.ActionSubformA.all.item(a).Table1.Row2.all.item(b).Status.rawValue=="Green")
LogoControls.ActionSubformA.all.item(a).Table1.Row2.all.item(b).presence="hidden";
}
}
for (var a=0;a<LogoControls._ActionSubformB.count;a++){
for (var b=0;b<LogoControls.ActionSubformB.all.item(a).Table2._Row2.count;b++){
if (LogoControls.ActionSubformB.all.item(a).Table2.Row2.all.item(b).Status.rawValue=="Green")
LogoControls.ActionSubformB.all.item(a).Table2.Row2.all.item(b).presence="hidden";
}
}
and for a show green button, just change "hidden" to "visible"
Kyle
Views
Replies
Total Likes
Try this:
for (var a=0;a<LogoControls._ActionSubformA.count;a++){
for (var b=0;b<LogoControls.ActionSubformA.all.item(a).Table1._Row2.count;b++){
if (LogoControls.ActionSubformA.all.item(a).Table1.Row2.all.item(b).Status.rawValue=="Green")
LogoControls.ActionSubformA.all.item(a).Table1.Row2.all.item(b).presence="hidden";
}
}
for (var a=0;a<LogoControls._ActionSubformB.count;a++){
for (var b=0;b<LogoControls.ActionSubformB.all.item(a).Table2._Row2.count;b++){
if (LogoControls.ActionSubformB.all.item(a).Table2.Row2.all.item(b).Status.rawValue=="Green")
LogoControls.ActionSubformB.all.item(a).Table2.Row2.all.item(b).presence="hidden";
}
}
and for a show green button, just change "hidden" to "visible"
Kyle
Views
Replies
Total Likes
dcidev,
Your script appears to work great. Thank you so much for your help with this form!
-Don
Views
Replies
Total Likes
Kyle,
Any chance you can answer this follow up question?
Views
Replies
Total Likes
Views
Likes
Replies