condition = viewScope.preText
+ " "
viewScope.preText is an array. eCondition
is a String. Since the user can select more than one checkbox, what exactly
do you want to do? If you want to append eCondition to each member of the
array you have to loop through the array to do the concatenation. This
is not Notes formula...
Also, I am not sure you can do the onClick
of the checkbox... Move that code to your button that closes the dialog
(to get the selected ids). For that matter if you just want the selected
UNID you don't have to get the document? The getSelectedIds returns the
array with the selected doc UNIDs.