itemCount
var bucket = document.getElementById("attachmentBucket"); if(bucket.itemCount == 0) { dump("\n\n No attachments \n\n"); } else { dump("\n\n Attachment Exists \n\n"); }