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.


Nullvalue(attribute | &variable)

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

  • To avoid the property dependence use the SetNull() or SetEmpty() methods.
  • To initialize variables with their empty value.
  • 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.


For Each
     Where Att = Nullvalue(Att)

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

For Each
     If Att = Nullvalue(Att)

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.

If nullvalue is assigned to an attribute in a Data Provider, it will set an empty value instead of null.


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