7.14 GET_TASK_PARAMETER_VALUE Function

This function gets the value of a Task parameter. This function can be used in SQL or PL/SQL to get the value of a Task parameter for a given task.

Syntax

APEX_APPROVAL.GET_TASK_PARAMETER_VALUE (
    p_task_id                IN NUMBER,
    p_param_static_id        IN VARCHAR2,
    p_ignore_not_found       IN BOOLEAN DEFAULT FALSE )
RETURN VARCHAR2;

Parameters

Table 7-10 GET_TASK_PARAMETER_VALUE Parameters

Parameter Description
p_task_id The Task ID.
p_param_static_id The static id of the parameter.
p_ignore_not_found If set to false (default) and no data is found, a no_data_found exception will be raised. If set to true and no data is found, null will be returned.

Returns

The task parameter value for the given static ID or null.

Exception

no_data_found - In the case where p_ignore_not_found is set to false and no data is found (for example, if the parameter of given name does not exist).

Example

DECLARE
    l_req_item varchar2(100);
BEGIN
    l_req_item := apex_approval.get_task_parameter_value(
        p_task_id         => 1234,
        p_param_static_id => 'REQ_ITEM'
    );
    dbms_output.put_line('Parameter REQ_ITEM of task 1234 has value ' || l_req_item);
END;