// (self.length != 0) ? // self : // (getContextData('2', 'cds.PROCESS_JOBID', '') == '-') ? // self : // getContextData('2', 'cds.PROCESS_JOBID', '') getValue(self, self.length, $('dcp.CDE5/RsM/MesEntity', ''), getContextData('2', 'cds.PROCESS_JOBID', ''), $('dcp.CDE5/RsM/Recipe', '')); function getValue(value, length, mesEntity, recipe, processJobId) { if (recipe.toUpperCase() === 'SHEET RHO LOW') return mesEntity; else if (recipe.toUpperCase() === 'SHEET RHO MID') return mesEntity; else if (recipe.toUpperCase() === 'SHEET RHO HIGH') return mesEntity; else if (recipe.toUpperCase() === 'SHEET RHO THIN') return mesEntity; else if (recipe.toUpperCase() === 'EPRO LOW') return mesEntity; else if (recipe.toUpperCase() === 'EPRO HIGH') return mesEntity; else if (length !== 0 || processJobId === '-') return value; else return processJobId; }