0

I have a case statement in Impropmtu that I need to recreate in Framework Manager. I need help with case statement syntax in Framework manager, and in this special case, there is a nested statement involved that makes it a bit more complicated.

I tried using the predefined components in Framework Manager to create the case statement but it doesn't work. I am thinking maybe it is because of the syntax.

This is the Impromptu expression from *.IQD file:

 CASE 
 WHEN  ((CASE 
 WHEN ((((((((('D12' || "ACCOUNT1") = 'E4GM') or 
 (('D12' || "ACCOUNT1") = 'E4M')) or 
 (('D12' || "ACCOUNT1") = 'DAM')) or 
 (('D12' || "ACCOUNT1") = 'DGM')) or 
 (('D12' || "ACCOUNT1") = 'DJM')) or 
 (('D12' || "ACCOUNT1") = 'DNM')) or 
 (('D12' || "ACCOUNT1") = 'DQM')) or 
 (('D12' || "ACCOUNT1") = 'DWM'))
 THEN ('Units') 
 ELSE null END) = 'Units') 
 THEN (CASE 
 WHEN ("MODEL" BETWEEN '10%' AND '19%') THEN ('Mini Unit') 
 WHEN ("MODEL" BETWEEN '21%' AND '22%') THEN ('Small Unit') 
 WHEN ("MODEL" BETWEEN '32%' AND '33%') THEN ('Medium Unit') 
 WHEN ("MODEL" BETWEEN '38%' AND '39%') THEN ('Large Unit') 
 WHEN ("MODEL" BETWEEN 'M3%' AND 'M4%') THEN ('WH Unit') 
 ELSE null END) ELSE null END as c21,
Monib
  • 9
  • 4
  • 2
    What is your question? – mentallurg Aug 16 '19 at 23:08
  • By 'predefined components in Framework Manager to create the case statement' what do you mean? What did your re-write look like? By 'but it doesn't work' what do you mean? What errors do you get? When you validate the expression, do you get errors? Work with the inner parts of the expression first and confirm that they work. That *should* control for them being the problem. – C'est Moi Aug 17 '19 at 10:22
  • Another thing to look out for is that your expression, as re-written, is syntactically incorrect. Format your expression so that you will be able to read it a bit better. Unfortunately FM's expression editor doesn't remember the formatting so you'll need to do this in another editor. – C'est Moi Aug 17 '19 at 10:22

0 Answers0