added search facility to getAttachments and getPaglist using array syntax