Tip #1398: Set calculated field to null

Calculated fields columns are great for quick simple formulas. They are fast, instant, and always up to date. But what if you need to clear the value of the column as part of the calculation?

Customer has sites, sites have assets in various categories (hardware, software, etc). The other day I’ve had a requirement to show the total value for an asset category as $0.00 if the site had the assets but wasn’t live yet and to show — if site didn’t have assets in a specific category. Serving as a visual clue. Great idea and calculated field with a condition on status should do the job. Except that sometimes I need to set it to null.

Create a dummy column Null Decimal. Not searchable, optional, no decimal places, never visible, always null.

Now we can use this column to set the value of a calculated decimal or a currency column.

Cover image by Gerd Altmann from Pixabay