Official Content

Returns True if the value of a given attribute or variable is empty.

Syntax

Null(Attribute | &Variable)

Where:

Attribute
      
Is an Attribute that should be able to be evaluated in the context where the function is used (it must belong to the Extended Table of the current Base Table, it must be instantiated, etc.).

&Variable
      
Is a Variable defined in the object where the function is used.
 

Type Returned:
Boolean (True or False)

Scope

Objects: Procedure, Transaction, Web Panel, Panel, Data Provider
Generatos: .NET, .NET Framework, Java, Ruby (up to GeneXus X Evolution 3), RPG, Visual FoxPro (up to GeneXus X Evolution 3), Cobol, Apple, Android, Angular

Description

Returns True if the value of the attribute or variable is empty.

Samples

Consider the following Transaction:

Customer
{
 CustomerId*
 CustomerName
 CustomerAddress
 }

Suppose you are asked to query the customers stored with null address. The following For Each command solve the requirement:

For each Customer
    where Null(CustomerAddress)
          Print Customer      /* The printblock contains the attributes: CustomerId, CustomerName*/
Endfor

See Also

Nullvalue function
IsNull function
IsEmpty method

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant