If/Then Condition Field in Calculated field not allowing text

Im trying to create a baq field to calculate total cost based off of a certain OpCode. When i fill in the if then else statement and enter in the Opcode as it appears throughout epicor, i get an error shown below. My expression is in the background.

For now ive used the Opseq that is TYPICALLY attached to that operation but not all of our jobs follow the exact same sequencing so we get the wrong data sometimes. Whats the best way to set the when variable to my opcode?

  1. your comparison needs an equals sign
  2. the text constant needs to be in single quotes
  3. your parenthesis don’t match
(case when JobOper.OpCode = 'xray' then (...) else (...) end)
1 Like

Joe

Put the Operation code in in single quotes.

‘xray’

1 Like

Thank you! This did the trick

Thank you! this did the trick