Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.
SalNumber DataSourceUserOrderBy( SalNumber nWhat, SalNumber nParam )
The DataSourceUserOrderBy method replaces the default order by statement with a user specified order by statement.
Name | Description |
---|---|
SalNumber nWhat | Standard method parameter. Possible values are Const.METHOD_Inquire, Const.METHOD_Execute, Const.METHOD_GetType |
SalNumber nParam | The order-by statement, not including the keyword "order by". |
When nWhat = Const.METHOD_Inquire: the return value is true if the specified order
by statement is equal to the current where statement.
When nWhat =
Const.METHOD_Execute: the return value is true.
DataSourceUserOrderBy is used by the framework query dialog.
The order by set by DataSourceUserOrderBy for a data source is only valid unit the next time that data source is populated. After the data source has been populated with the specified order by statement, the user-specified order by statement is reset.
Application can use the DataSourceUserOrderByGet method to retrieve the user-specified where statement used in the last populate.
Function: Sort Description: Sort ascending or descending Parameters Boolean: bAscending Actions ! Set order by expression If bAscending Call DatIf bAscending Call DataSourceUserOrderBy( METHOD_Execute, SalHStringToNumber( "id, name asc" ) ) Else Call DataSourceUserOrderBy( METHOD_Execute, SalHStringToNumber( "id, name desc" ) ) ! Repopulate the data source Call DataSourcePopulateIt( POPULATE_Single )