Nullvalue Function

Official Content
This documentation is valid for:

This function retrieves the “null” value of an attribute or variable. That value may be empty or the Null itself, depending on the context where the function is used.

Syntax

Nullvalue(attribute | &variable)

It can be used in assignments and conditions with slightly different results:

Assignments
  • To avoid the property dependence use the SetNull() or SetEmpty() methods.
  • To initialize variables with their empty value.
Conditions
  • Using the function with variables means that the corresponding empty value will be considered.
  • Using the function with attributes will depend on whether the condition is evaluated on the server or the client.

Examples

For Each
     Where Att = Nullvalue(Att)
EndFor

In this case the For Each considers those records with an empty ATT.

For Each
     If Att = Nullvalue(Att)
        ....
     EndIf
EndFor

In this case the For Each retrieves records where Att is empty or Null.

Note that in this case the function does not take into account the Generate null for nullvalue() property.

Scope

Objects: Procedures, Transactions, Web PanelsWork Panels
Languages: .NET, Java, Ruby (up to GeneXus X Evolution 3), RPG, Visual FoxPro (up to GeneXus X Evolution 3), Cobol

See Also

Null Function
IsNull Function
SetNull Method