// (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() === 'STANDARD \\ RLOW_STD') return 'RLOW_STD'; else if (recipe.toUpperCase() === 'STANDARD \\ RMID_STD') return 'RMID_STD'; else if (recipe.toUpperCase() === 'STANDARD \\ RHI_STD') return 'RHI_STD'; else if (recipe.toUpperCase() === 'STANDARD \\ THINSPC') return 'THINSPC'; else if (length === 0) return product; else return value; }