I have the below formatted search, which works, to get a gl account from a service call linked to a sales order via a UDF (U_CallID).
select case when ISNULL($[RDR1.BASEENTRY],0) > 0
when isnull($[ORDR.U_CalliD],'') = '' then $[$38.159.0]
FROM OSCL (nolock)
WHERE (OSCL.callID = $[ORDR.U_CalliD]))
end as GLAcct
I now need to modify this to only apply the last else statement for when OSCL.CallType in (10,13,15) or OSCL.Customer = 'IDept01'
If the OSCL.Calltype <> 10, 13 ,15 then = $[$38.159.0] needs to apply.
Your assistance will be much appreciated.