// (self.length != 0) ? // self : // (getContextData('2', 'cds.PROCESS_JOBID', '') == '-') ? // self : // getContextData('2', 'cds.PROCESS_JOBID', '') getValue(self, self.length, $('dcp.TENCOR1/pcl/MesEntity', ''), $('dcp.TENCOR1/pcl/asdf', ''), getContextData('2', 'cds.PROCESS_JOBID', '')); function getValue(value, length, mesEntity, recipe, processJobId) { if (recipe.toUpperCase() === 'adsf') return mesEntity; else if (length !== 0 || processJobId === '-') return value; else return processJobId; }