It is one of the three main components of the Data Provider output-based declarative language.
It sorts a set of subordinate Elements or another Groups. It may or may not be a collection. GeneXus is intelligent enough to figure out when the Group is a repetitive one and when it is not. With repetitive groups, a group is like a for each, with many of its clauses being valid.
In this example, Customers is a collection and Customer is not (in the sense that it will be one 'Customers', made up by many 'Customer' items. Customer is a repetitive group)
With repetitive groups, all For Each clauses like Order and Where can be used. For example:
Customer Order CustomerName
Where CustomerBalance > 1000
Code = CustomerId
Name = CustomerName
- Order and Where clauses apply to Input attributes, not to Elements. For example: 'Order CustomerName' is valid but 'Order Name' is not. In fact, the order will cause an access to the Database.
- The behavior is the same as in a For Each command. This includes the way to determine the base table, and the fact that conditional order clauses as well as conditional where clauses are valid. The same happens with the 'USING' Data Selector clause and the 'IN' operator used in a where clause (that is, Data Selectors can also be used in a Data Provider group, in the same way, same syntax, as in a For each. See some examples).
- To see an example with order and defined by clauses, read Example: comparison between a Break in a Procedure and in a Data Provider