setFilterArray method: SearchFilter class

Syntax

setFilterArray(&arrFilters, &GroupBoxID)

Description

Use this method to apply page-level context filters to an Interactive Insights dashboard. The method refreshes the dashboard in the specified group box and replaces the existing dashboard filters with the supplied filters.

Parameters

Parameter Description

&arrFilters

Specifies an array of PTSF_INSIGHTS:FilterValues objects to apply to the dashboard.

&GroupBoxID

Specifies the group box ID that contains the Interactive Insights dashboard.

Returns

None.

Example

import PTSF_INSIGHTS:ConsolidateFilters;
import PTSF_INSIGHTS:FilterValues;

Local PTSF_INSIGHTS:ConsolidateFilters &oConsolidateFilters;
Local array of PTSF_INSIGHTS:FilterValues &arrFilters;
Local PTSF_INSIGHTS:FilterValues &oFilter;
Local string &GroupBoxID;

&oConsolidateFilters = create PTSF_INSIGHTS:ConsolidateFilters();
&arrFilters = CreateArrayRept(create PTSF_INSIGHTS:FilterValues(), 0);

/* Build the filter values using the same logic used for the initial dashboard load. */
&oFilter = create PTSF_INSIGHTS:FilterValues();

/* Set filter values as required by the dashboard filter definition. */
/* Example only: use the appropriate FilterValues methods for your filter. */
/* &oFilter.<method_name>(<filter_parameters>); */

&arrFilters.Push(&oFilter);

&GroupBoxID = "MY_DASHBOARD_GB";

&oConsolidateFilters.setFilterArray(&arrFilters, &GroupBoxID);