DataSourceUserWhere

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 DataSourceUserWhere( SalNumber nWhat,
		            SalNumber nParam )

The DataSourceUserWhere method appends a user specified where statement to the default where statements.

Parameters

Name Description
SalNumber nWhat Standard method parameter. Possible values are Const.METHOD_Inquire, Const.METHOD_Execute, Const.METHOD_GetType
SalNumber nParam The user-where statement, not including the keyword "where".

Returns

When nWhat = Const.METHOD_Inquire: the return value is true if the specified where statement is equal to the current where statement.
When nWhat = Const.METHOD_Execute: the return value is true.

Comments

DataSourceUserWhere is used by the framework query dialog.

The where-statement set by DataSourceUserWhere 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 where statement, the user-specified where statement is reset.

Application can use the DataSourceUserWhereGet method to retrieve the user-specified where statement used in the last populate.

Example

Function: ShowOk
Description: Show all objects with status = Ok
Actions
   ! Set where-expression
   Call DataSourceUserWhere( METHOD_Execute, SalHStringToNumber( "objstate = 'OK'" ) )
   ! Repopulate the data source
   Call DataSourcePopulateIt( POPULATE_Single )
new C# coding sample
DataSourceUserWhere(Ifs.Fnd.ApplicationForms.Const.METHOD_Execute, lsStmt.ToHandle());
bOk = ((cTableWindow)this).DataSourcePopulateIt(bPopulateSingle);
........