Mike Phares bb857211e9 WS Result bug fix, Nuget bump, PSN, Reactor,
Extra RDS rule, OpenInsightApi and testRunTitle
2023-03-07 08:52:07 -07:00

22 lines
746 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() === '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;
}