GetApprovers

Syntax

GetApprovers (approval_rule_set, evaluation_fields_rowset, approvers_rowset, approvers_record)

Description

The GetApprovers function:

  • Evaluates each step in the approval rule set.

  • Ignores a step when the rules for the step indicate that no approver is necessary.

  • Obtains the role users for a step when the rules for the step indicate that an approver is required.

    GetApprovers identifies the role users using the method defined in the step: with either a SQL object or a route control.

After every step has been evaluated, the results are returned to the calling program as a rowset object.

Parameters

Parameter Description

approval_rule_set

The approval rule set name.

evaluation_fields_rowset

The rowset containing the fields that the rules evaluate. The records and fields referenced by the approval rule set must be at the current level, that is, the same level as the call to GetApprovers.

approvers_rowset

A rowset created from the record APPR_USERLIST. GetApprovers adds rows for each required approval.

approvers_record

The name of the record in which the returned approver data is stored.

Returns

Returns a rowset with the following data for each required approver:

  • ROLEUSER

  • ROLENAME

  • STEP

  • PATH

GetApprovers also inserts this data into a record that you specify.

Example

GetApprovers("ORDER_APPROVAL", GetLevel0(), GetLevel0()(1).GetRowset(Scroll.APPR_⇒
USERLIST), "APPR_USERLIST")