22 lines
840 B
JavaScript

// (self.length != 0) ?
// self :
// (getContextData('2', 'cds.PROCESS_JOBID', '') == '-') ?
// self :
// getContextData('2', 'cds.PROCESS_JOBID', '')
getValue(self, self.length, $('dcp.CDE5/RsM/MesEntity', ''), $('dcp.CDE5/RsM/Recipe', ''), getContextData('2', 'cds.PROCESS_JOBID', ''));
function getValue(value, length, mesEntity, recipe, processJobId) {
if (recipe.toUpperCase() === 'STANDARD \\ RLOW_STD')
return mesEntity;
else if (recipe.toUpperCase() === 'STANDARD \\ RMID_STD')
return mesEntity;
else if (recipe.toUpperCase() === 'STANDARD \\ RHI_STD')
return mesEntity;
else if (recipe.toUpperCase() === 'STANDARD \\ THINSPC')
return mesEntity;
else if (length !== 0 || processJobId === '-')
return value;
else
return processJobId;
}