---
schema_version: "1"
id: 88eab19d6102727f53eff5ac3d9ad20d6785788e2423007313a95773c25f91cb
title: NULLVALUE
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/customize_functions_nullvalue.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.customize_functions_nullvalue.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 459d84d0f733453731aa6acdff69e424c49120a625db3240aa2554dcfdff77d0
description: Determines if an expression is null (blank) and returns a substitute expression if it is. If the expression is not blank, returns value of the expression.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# NULLVALUE

Determines if an expression is null (blank) and returns a substitute expression if it is. If the expression is not blank, returns value of the expression.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_important.png)

Important Use BLANKVALUE instead of NULLVALUE in new formulas. BLANKVALUE has the same functionality as NULLVALUE, but also supports text fields. Salesforce continues to support NULLVALUE, so you don’t need to change existing formulas.

## Use

`NULLVALUE(expression, substitute_expression)` and replace expression with the expression you want to evaluate; replace substitute\_expression with the value you want to replace any blank values.

## Tips

- Avoid using this function with text fields because they are never null even when they are blank. Instead, use the [BLANKVALUE](https://help.salesforce.com/s/articleView?id=platform.customize_functions_blankvalue.htm&release=264.0.0&type=5 "Determines if an expression has a value and returns a substitute expression if it doesn’t. If the expression has a value, returns the value of the expression.") function to determine if a text field is blank.
- Don’t use NULLVALUE for date/time fields.
- Choose Treat blank fields as blanks for your formula when referencing a number, percent, or currency field in a NULLVALUE function. Choosing Treat blank fields as zeroes gives blank fields the value of zero so none of them are null.
- Use the same data type for both the expression and substitute\_expression.

![Custom Field Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

Custom Field Example `(NULLVALUE(Sample_Due_Date__c, StartDate +5)`

This formula returns the date five days after the start date whenever Sample Due Date is blank. Sample Due Date is a custom date field.