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