---
title: "Use the IFDEFINED Function to Fill Values in an Expression"
slug: "ifdefined-function"
description: "Learn to use the IFDEFINED function to fill defined values in your expressions with a specified value in Pigment."
updated: 2025-05-30T09:38:31Z
published: 2025-08-22T12:00:18Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://kb.pigment.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IFDEFINED function

## Description

Fills the defined values of an expression with a given value.

## Syntax

`IFDEFINED(Expression containing values, Value if defined, Value if blank )`

## Arguments

| Argument | Type | Description |
| --- | --- | --- |
| *Expression containing values*(required) | Any | Expression containing Values. |
| *Value if defined*(required) | Any | Expression containing value you want to fill if the argument *Expression containing values*contains values. This needs to be the same type as the argument *Value if blank.* |
| *Value if blank*(optional) | Any | Expression containing the value you want to fill if the argument *Expression containing values*contains no values (`BLANK`). This needs to be the same type as the argument *Value if defined.* This is an optional argument, so if no value is provided for this argument, it returns `BLANK`. |

## Returns

| Type | Output Structure (Dimensions) |
| --- | --- |
| Same type as *Value if defined*/ *Value if blank* | All Dimensions in the arguments *Expression containing values*, *Value if defined*, *Value if blank*. |

## Examples

| Formula | Result | Description |
| --- | --- | --- |
| `IFDEFINED (1, TRUE, FALSE)` | `TRUE` | Value 1 is defined, fill with `TRUE`. |
| `IFDEFINED (1, TRUE)` | `TRUE` | Value 1 is defined, fill with `TRUE` |

**Excel equivalent**: IF(NOT(ISBLANK(*cell*)), *value if true*, *value if false*)

**See also**: [ISDEFINED](/v1/docs/isdefined-function), [IFBLANK](/v1/docs/ifblank-function), [IF](/v1/docs/if-function)

<style> p[data-block-id] {font-size:1rem;} ul li p[data-block-id] {margin-bottom: 0;} ul[data-type="taskList"] li div p[data-block-id] {margin-bottom: 0;} ol li p[data-block-id] {margin-bottom: 0;} table tbody th p[data-block-id] { margin-bottom: 0;} blockquote p[data-block-id] {margin-bottom: 0 !important;} &nbsp;p[data-block-id]:empty::after {content: "\00A0";} </style>
