on 2015 Mar 05 4:09 PM
Can someone please help? I am having difficulties lableing blank fields using a case statement formula. Example:
select {Mtr_Test.Action_Type_Cd}
case ' ' : 'No Action Taken'
case '0' : 'No Action Taken'
case '1' : 'Send to Manufacturer RMA'
case '2' : 'Repaired in Shop'
case '3' : 'Retired'
default : 'Not Found'
I would like to treat a blank field the same as if it where case '0' : 'No Action Taken'.
Request clarification before answering.
Hi Steve,
Look for an option on the top in the Formula Editor called 'Exceptions for Nulls'; set that to 'Default Values for Nulls'.
This will convert any NULLs in the {Mtr_Test.Action_Type_Cd} column to blanks if it is a string field.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Abhilash,
Awesome. That worked perfectly. {Mtr_Test.Action_Type_Cd}'s that are 0 and blank, now are listed in my report as 'No Action Taken'. Brian also suggested using the Report Options settings which accomplished the same thing. However, that seems to be a more global setting. I chose to use the 'Exception for Nulls' at the formula level. In either case, this new found knowledge will prove quite useul. Thanks again to both you and Brian!
select {Mtr_Test.Action_Type_Cd}
case ' ' : 'No Action Taken'
case '0' : 'No Action Taken'
case '1' : 'Send to Manufacturer RMA'
case '2' : 'Repaired in Shop'
case '3' : 'Retired'
default : 'Not Found'
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.