I'm not sure which options controls this... Boolean clauses, with parentheses, are not indented "properly". The sample code in the plugin has only very simple Boolean and doesn't reflect a complex clause. See example below
Notepad++ v8.4.5 (x64)
SQLinForm GUI 6.22.9.9, Engine 6.22.03.31
Here is example of as close as I could get.
CASE WHEN SHORT_DCE_TYPE IN ('S', 'N') AND ( ALGN_TYPE = 'C' OR ( ALGN_TYPE = 'V' AND VA_CAT = 'C' ) ) AND FIN_ELIG = 1 AND BENE_RATIO <= 3.00 AND ( ( BNMRK = 'A' AND RYSUM.BENE_DCNT_ANNUAL_RY >= 1500 ) OR ( BNMRK = 'E' AND RYSUM.BENE_DCNT_ANNUAL_RY >= 50 ) ) THEN 0.12345 WHEN SHORT_DCE_TYPE = 'H' OR ( SHORT_DCE_TYPE IN ('S', 'N') AND ALGN_TYPE = 'V' AND VA_CAT = 'N' ) THEN 0.56789 ELSE NULL END AS THIS_VALUE
The nested indentation of Boolean causes I'm trying to obtain should be something like this:
CASE WHEN SHORT_DCE_TYPE IN ('S', 'N') AND ( ALGN_TYPE = 'C' OR ( ALGN_TYPE = 'V' AND VA_CAT = 'C' ) ) AND FIN_ELIG = 1 AND BENE_RATIO <= 3.00 AND ( ( BNMRK = 'A' AND RYSUM.BENE_DCNT_ANNUAL_RY >= 1500 ) OR ( BNMRK = 'E' AND RYSUM.BENE_DCNT_ANNUAL_RY >= 50 ) ) THEN 0.12345 WHEN SHORT_DCE_TYPE = 'H' OR ( SHORT_DCE_TYPE IN ('S', 'N') AND ALGN_TYPE = 'V' AND VA_CAT = 'N' ) THEN 0.56789 ELSE NULL END AS THIS_VALUE
Hi jpotelle,
thanks for your feedback. I think the formatting rules you are looking for is already implemented for the WHERE conditions
Example
I could indeed try to implement these rules also for the CASE statement
Regards
Guido
Yes, that would be very helpful ?
It's working. Thank you! ?