Manually create checkboxes in a web view column.

Use this code when you only want a subset of the documents to have checkboxes available in a web view. The view property "Allow selection of documents" will display checkboxes for all documents. You can nest the code below in an if statement that checks for different form types or other flag fields.
HTML • JavaScript • Lotus Formula • Lotus Notes View

VIEW COLUMNS

"[" + "<INPUT TYPE=\'checkbox\' NAME=\'$$SelectDoc\' Value=" + @Text(@DocumentUniqueID) + ">"+"]"

SAMPLE USAGE

var cb = parent.SubLower.document.forms[0].$$SelectDoc;
// find the first checked document . . .
var selectcount = 0;
var docUNID = new Array();
for(i = 0; i < cb.length; i ++){
	if (cb[i].checked){
		docUNID[selectcount] = cb[i].value;
		selectcount++;
	}
} 

if (docUNID[0] == null ){
	alert('You did not select any documents, please correct and try again.');
}
else {
	if (document.forms[0].Type.value == "Client Admin") {
		if (docUNID != null ){
			result=window.confirm('This operation will toggle the selected documents Reviewed or Review Pending, click OK if you wish to proceed.');
			if (result==true) {
				parent.SubLower.document.forms[0].TargetAgent.value = "LockUnlock"
				parent.SubLower.document.forms[0].SelectedDocs.value = docUNID
				parent.SubLower.document.forms[0].submit();
			}
			else {
				var fieldname = parent.SubLower.document.forms[0].$$SelectDoc;
				for(i = 0; i < fieldname.length; i ++){
					fieldname[i].checked=false
				} 
			}
		}
	}
	else {
		alert("You do not have sufficient administrator rights to use this function.")
		var fieldname = parent.SubLower.document.forms[0].$$SelectDoc;
		for(i = 0; i < fieldname.length; i ++){
			fieldname[i].checked=false
		} 
	}
}

Posted by fbrefere001 on Wednesday August 6, 2003