i
This is not the latest version of this document; to access the latest version, click here.
Official Content

Deprecated: Since GeneXus X Evolution 3. Replaced by Unique Clause.

It is used to specify uniqueness of records retrieved.

Syntax

In For Each command and Xfor Each command:

Option Distinct

In Data Provider object:

GroupName [Distinct]

Description

This clause allows the For each command and Data Provider object to only return records where the set of values of the attributes referred to is unique.

The attributes that are included in the distinct clause are those referenced in the for each command, including: the attributes in the Where, Defined By and the attributes needed to navigate the extended table.

Examples

Suppose that we have defined the following For Each command:

For Each
       Defined by InvoiceDate
       option Distinct
       &CustomerName = CustomerName
EndFor

which is equivalent to this Data Provider:

Customers
{
      Customer [Distinct]
      Defined by InvoiceDate
           {
                   CustomerName
           }
}

The result is a list of different Customer Names.

Note

In For Each and XFor Each commands this clause can only be specified immediately after a For Each, Where, or  Defined by command.

Scope

See also

For Each command
Xfor Each command
Option Distinct clause

 


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