26 lines
921 B
JavaScript
26 lines
921 B
JavaScript
// (self.length != 0) ?
|
|
// self :
|
|
// (getContextData('2', 'cds.PRODUCT', '') == '-') ?
|
|
// self :
|
|
// getContextData('2', 'cds.PRODUCT', '')
|
|
|
|
getValue(self, self.length, getContextData('2', 'cds.PRODUCT', ''), $('dcp.CDE5/RsM/Recipe', ''));
|
|
|
|
function getValue(value, length, product, recipe) {
|
|
if (recipe.toUpperCase() === 'SHEET RHO LOW')
|
|
return 'Sheet Rho Low';
|
|
else if (recipe.toUpperCase() === 'SHEET RHO MID')
|
|
return 'Sheet Rho Mid';
|
|
else if (recipe.toUpperCase() === 'SHEET RHO HIGH')
|
|
return 'Sheet Rho High';
|
|
else if (recipe.toUpperCase() === 'SHEET RHO THIN')
|
|
return 'Sheet Rho Thin';
|
|
else if (recipe.toUpperCase() === 'EPRO LOW')
|
|
return 'EPro Low';
|
|
else if (recipe.toUpperCase() === 'EPRO HIGH')
|
|
return 'EPro High';
|
|
else if (length !== 0 || product === '-')
|
|
return value;
|
|
else
|
|
return product;
|
|
} |