Skip to main content

Exists - script function

Exists() determines whether a specific field value has already been loaded into the field in the data load script. The function returns TRUE or FALSE, so can be used in the where clause of a LOAD statement or an IF statement.

Information noteYou can also use Not Exists() to determine if a field value has not been loaded, but caution is recommended if you use Not Exists() in a where clause. The Exists() function tests both previously loaded tables and previously loaded values in the current table. So, only the first occurrence will be loaded. When the second occurrence is encountered, the value is already loaded. See the examples for more information.

Syntax:  

Exists(field_name [, expr])

Return data type: Boolean

Arguments:  

Arguments
Argument Description
field_name

The name of the field where you want to search for a value. You can use an explicit field name without quotes.

The field must already be loaded by the script. That means, you cannot refer to a field that is loaded in a clause further down in the script.

expr

The value that you want to check if it exists. You can use an explicit value or an expression that refers to one or several fields in the current load statement.

Information noteYou cannot refer to fields that are not included in the current load statement.

This argument is optional. If you omit it, the function will check if the value of field_name in the current record already exists.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!