Function used for checking whether a field contains a value or not.
/**
* Function to check whether the field has an empty value or not.
* @param {parameter} parameter - fieldValue
* @returns {boolean} true - if the value is not empty
* @returns {boolean} false - if the value is empty
*/
function checkForParameter(parameter) {
try {
if (parameter != "" && parameter != null && parameter != undefined && parameter != "null" && parameter != "undefined" && parameter != " " && parameter != false && parameter != '' && parameter != ' ') {
return true;
} else {
return false;
}
}
catch (e) {
log.error({
title: "Error @ empty check Function: ", details: e.name + ' : ' + e.message
});
}
}