ADD_FILTER Procedure Signature 3
This procedure creates a filter on an interactive grid using a report Static ID.
Note: The use of this procedure in a page rendering process causes report download issues (CSV, HTML, Email, and so on). When a user downloads the report, the interactive grid reloads the page with download format in the REQUEST value. Any interactive grid settings changes (such as add filter or reset report) are done in an Ajax request. Thus, the download data may not match the report data user is seeing. For this reason, Oracle recommends only using this procedure in a page submit process.
Syntax
APEX_IG.ADD_FILTER (
p_page_id IN NUMBER,
p_region_static_id IN VARCHAR2,
p_filter_value IN VARCHAR2,
p_column_name IN VARCHAR2 DEFAULT NULL,
p_operator_abbr IN VARCHAR2 DEFAULT NULL,
p_is_case_sensitive IN BOOLEAN DEFAULT FALSE,
p_report_static_id IN VARCHAR2 DEFAULT NULL,
p_multi_value_separator IN VARCHAR2 DEFAULT NULL );
Parameters
| Parameter | Description |
|---|---|
p_page_id |
Page of the current Oracle APEX application that contains an interactive grid. |
p_region_static_id |
The interactive grid region Static ID. |
p_filter_value |
This is the filter value. This value is not used for N and NN. |
p_column_name |
Name of the report SQL column, or column alias, to be filtered. When not set, a row filter is defined. |
p_operator_abbr |
The filter type to use for the column filter. Valid values are:
|
p_is_case_sensitive |
Case sensitivity of the row search filter. This value is not used for a column filter, where p_report_column is set. Valid values are as follows:
|
p_report_static_id |
The saved static ID within the current application page. If p_report_static_id is NULL, it adds the filter to the last viewed report settings. |
p_multi_value_separator |
Separator for multi-value filters (IN/NIN operators). |
Example 1
The following example shows how to use the ADD_FILTER procedure to filter the interactive grid with report Static ID statistics in page 1, region Static ID analysis of the current application with DEPTNO equals 30.
BEGIN
APEX_IG.ADD_FILTER(
p_page_id => 1,
p_region_static_id => 'analysis',
p_filter_value => '30',
p_column_name => 'DEPTNO',
p_operator_abbr => 'EQ',
p_report_static_id => 'statistics' );
END;
Example 2
The following example shows how to use the ADD_FILTER procedure to filter the interactive grid with report Static ID of statistics in page 1, region Static ID analysis of the current application with rows containing the case-sensitive word Salary.
BEGIN
APEX_IG.ADD_FILTER(
p_page_id => 1,
p_region_static_id => 'analysis',
p_filter_value => 'Salary',
p_is_case_sensitive => true,
p_report_static_id => 'statistics' );
END;