IScheduledTaskProperties.LoadParamValues

Syntax

LoadParamValues(Values: IMetabaseObjectParamValues): Boolean;

Parameters

Values are the object parameters.

Description

The LoadParamValues method checks if the values of the task parameters are set. The method returns True if the parameters are set, and False if not.

Example

The given example requires a scheduled tasks container with the TASK_CONTAINTER identifier, that contains a task of regular report calculation with the REPORT_TASK identifier.

Sub UserProc;
    Var
    MB : IMetabase;
    Obj: IMetabaseObject;
    Pare: IMetabaseObjectDescriptor;
    Exe: ICalculateReportScheduledTask;
    Prop: IScheduledTaskProperties;
    Pars: IMetabaseObjectParams;
    Vals: IMetabaseObjectParamValues;
Begin
    Mb := MetabaseClass.Active;
    Pare := Mb.ItemById("TASK_CONTAINER").Bind;
    If Pare = Null Then
        Return;
    End If;
    Obj := Mb.ItemById("REPORT_TASK").Edit;
    Pars := Obj.Params;
    Exe := Obj As ICalculateReportScheduledTask;
    Prop := Exe.Properties;
    Vals := Prop.ParamValues;
    If (Prop.LoadParamValues(Vals) <> TrueThen
        Vals := Pars.CreateEmptyValues;
    End If;
    Obj.Save;
End Sub UserProc;

After executing this example the empty values are set to the task parameters values of which were not assigned earlier.

See also:

IScheduledTaskProperties