I'm trying to access the selected values of a checkbox group in SSJS within a button on an Xpage. The button itself is building an email based on various elements of the page. I've tried numerous ways and the nearest I've come so far is:
var _temp = getComponent("checkBoxGroup1").getValue();
for (x in _temp)
stream.writeText("<td>" + _temp[x] + "</td>");
The code is building part of a table with the checkbox values inside table cells. Now I'm getting the correct amount of values returned (ie I tick 3 boxes in the group and 3 values get returned), however all of the values are 'undefined'.
The checkbox group is bound to a field on a notes document and so gets stored as a text list and I've had no luck trying to get the values via the field either.
I'm sure this is probably something so simple but it's evading me at the moment so any help would be appreciated!