Hi,
That layout makes things a bit harder, but try this code
var result = [];
var checkboxes = [];
function findCheckboxes(vContainer)
{
if (vContainer.className == "field")
{
if (vContainer.ui.oneOfChild.className == "checkButton")
{
checkboxes.push(vContainer)
}
}
else
{
var vChildren = vContainer.nodes;
for (var i = 0; i < vChildren.length; i++)
{
var vChild = vChildren.item(i);
if (vChild.isContainer)
{
findCheckboxes(vChild)
}
}
}
}
findCheckboxes(Table14);
for (var i = 0; i < checkboxes.length; i++) {
var checkbox = checkboxes[i];
if (checkbox.rawValue == checkbox.items.nodes.item(0).value) {
result.push(checkbox.caption.value.text.value)
}
}
result.join(", ");
I've updated my sample, https://sites.google.com/site/livecycledesignercookbooks/home/shahnisarg28%20(3).pdf?attredirects=0&...
This sample also shows an alternative to the table, and uses the original (and simpler) script. Just in case you didn't have other reasons for using a table.
Also I haven't done anything special with the "other" option, should this be added to the text field as well?
Regards
Bruce