IIF Statement with Multiple conditions

I’m looking to write something like this:

If Joboper.opcode=‘Squ’ and ResourceGroup.JcDept=‘Sdept’ then Jobhead.JobNum+G else Jobhead.Jobnum

Seems the and is causing an error of Expression of non-boolean type specified in a context where a condition is expected, near then.

Are you talking about this in a BAQ? Use a case statement for multiple conditions.
Case
when JobOper.OpCode = ‘Spiu’ and ResourceGroup.JcDept = ‘Sdept’ then Concat(JobHed.JobNum , ‘G’ )
else JobHed.JobNum
end

Syntax is probably wrong but you get the idea?

Figured it out. I actually typed it out correctly for this site, but didn’t have it typed in correctly in the BAQ. Note: I was using Case When and not IIF. LOL! Thanks!

1 Like