GetParameters

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.

SalBoolean GetParameters( SalString sMethodName,
                      cMessage Mandatory,
                      cMessage NonMandatory )

The GetParameters method returns the predefined (default) parameters for a Task.

Parameters

Name Description
SalString sMethodName The method name of the Task.
cMessage Mandatory List of all mandatory parameters that must contain a value when the Task is run.
cMessage NonMandatory List of all non mandatory parameters (if any)

Returns

The return value is TRUE is the Task is available and its predefined parameters are fetched, FALSE otherwise.

Comments

This method might be useful when resetting a cTaskParameterSheet to its default values with e.g. a pushbutton named "Default".

Example

Function: UM_Default
   Parameters
      Number: nWhat
   Local variables
      cMessage: Mandatory
      cMessage: NonMandatory
      String: sAnalyzeMethod
   Actions
      ...
      Case nWhat
         Case METHOD_Execute
         Call TaskScheduler.GetParameters( 'DATABASE_SYS.EXECUTE_ANALYZE_SCHEMA__', Mandatory, NonMandatory )
         Set sAnalyzeMethod = Mandatory.FindAttribute( 'METHOD', strNULL )
         If sAnalyzeMethod = 'AUTOMATIC'
            Set rbAutomatic = TRUE
C# code
// Store the default parameters
if (_bNeedFetchDefParameters) 
{
	// Fetch them first, if needed
	_lsDefParameters = Var.TaskScheduler._GetParameters(_nScheduleMethodId);
	_bNeedFetchDefParameters = false;
}
Sal.SendMsg(hWnd, Const.AM_User, 2, _lsDefParameters.ToHandle());