Scenario
User has a formula that uses CASE expression to get data per Item Type in columns, instead of rows.
- Sample formula: CASE WHEN {item.type} = 'Inventory Item' THEN {amount} ELSE 0 END
However, the formula doesn't work for Non-inventory Items as it shows only blank/null.
Solution
User should double check the capitalization in the formula used. If a capital letter I is used, it is standard behavior that the formula will return blank/null.
Note that the string enclosed in the single quotes in the formula is case sensitive. Since the system uses 'Non-inventory Item', then this is the exact string that should be used as well.
Hence, the formula for Non-inventory Items is should be:
- CASE WHEN {item.type} = 'Non-inventory Item' THEN {amount} ELSE 0 END
As best practice, show the field in the Results tab first, to be able to determine the correct values/strings that you need in your formula.
-----
If you find this information useful, let us know by reacting or commenting on this post!