Establishes the order of a Web Panel's base table, when there is at least one grid.
Objects: Web Panel, Work Panel, Work With for Smart Devices, Panel
Generators: .NET, .NET Framework, Java, Apple, Android,
This rule controls the order of the Panel's base table. If this rule is omitted and there is no order set at Order property grid level, the same standard used in Procedures is assumed: the primary key of the base table will be used.
To specify that a descending order is desired on any attribute from the list of attributes, the attribute's name must be written between brackets. Attributes with both, ascending and descending orders,.
Although this rule is valid for a Web Panel without any grid, its usefulness in this case, is unclear. As only one database record is displayed, the order does not seem to make much sense. It can be useful when it is required to keep the first or last record of a set ordered by some criteria, though.
On the other hand, when the Web Panel has one grid, this rule makes perfect sense because many records will be returned by the database query. Note, however, that the Order property of the grid could have been used instead.
Since GeneXus X Evolution 3, this rule only applies to the Panel's form (its fixed-part, not the grids), as the form (the fixed-part) determines its own base table, different than the grids'.
The following transaction has been defined to store clients' information, where the clients are identified by a number (ClientId):
A Web Panel with a grid showing the client's information ordered by name could have the following rule:
Given the following Invoice Transaction:
For designing a Web Panel showing the invoices ordered by date (descending order) and supplier id (ascending order), the following rule needs to be included: