Defined By Clause

To define the Base Table of the related command or statement.

Appears to solve some problems of ambiguity in the determination of the base table (when there are several minimum extended tables containing the command attributes) or when we want another base table, different from the one that would be determined by the attributes appearing in the rest of the command. It is also used to improve the specification time of complex reports; however, an indiscriminate use is not recommended. The disadvantage of using this clause when it isn’t necessary is that it ties the code a little more to the design of the tables.



Defined by <AttributeList>


     List of attributes to determine the related base table.


This command allows the user to define the Base Table of a For Each command (X Evolution 2), New command or Data provider group (GeneXus X Evolution 2) explicitly. When defining Procedures/Reports/Work Panel, it is usual for attributes in commands to determine the Base Table. Sometimes, commands within the command do not determine exactly the Base Table (i.e. more than one table can be the Base Table), so it is necessary to declare it explicitly using this command. The attribute list will determine the base table with higher priority.


  • This clause can only be specified immediately after a For each, Where, or other Defined by command.
  • The use of the 'Defined by' clause remarkably improves the program specification time, especially in large applications and in For Each or Data Provider groups with large extended tables.

See Some considerations on the Defined by clause in For each or Data Provider.


Commands: For Each command (X Evolution 2)Data provider group (GeneXus X Evolution 2)

See Also

For Each command (X Evolution 2)
Where clause