SwitchInsightsDashboard
Syntax
SwitchInsightsDashboard(<Current dashboard name>, <New dashboard name>, <App Class for filter>, <Mode>Description
Use the SwitchInsightsDashboard built-in PeopleCode API to switch the configured Interactive Insights dashboard during page load. When the Insights dashboard loads, PeopleTools checks the current configured dashboard name. If the configured dashboard matches the value passed to the API, PeopleTools replaces it with the new dashboard name. Use this API for context-specific page-load use cases, such as a WorkCenter where multiple components use the same application page but require different dashboards.
This API supports both Tile View and Full View dashboards.
Parameters
| Parameter | Description |
|---|---|
|
<Current dashboard name> |
(Optional) Specifies the configured dashboard that must be replaced. Use this parameter when the page contains multiple related content group boxes or multiple configured dashboard entries and PeopleTools must identify which dashboard to switch. If the page has only one configured dashboard for the use case, this value can be blank. |
|
<New dashboard name> |
(Required) Specifies the dashboard that PeopleTools loads instead of the configured dashboard. |
|
<App Class for filter> |
(Optional) Specifies the application class that applies the initial filters for the replacement dashboard. If this value is blank, PeopleTools uses the configured filter behavior, where applicable. |
|
<Mode> |
(Optional) Specifies the dashboard mode to switch. Valid values are TV for Tile View and FV for Full View. If this value is blank, PeopleTools uses TV as the default value. |
Returns
None.
Example
Example 1: Switch to a Full View dashboard and apply filters.
SwitchInsightsDashboard(
"Bills by Bills Status",
"Billing Analysis",
"BI_EMBED_INSIGHT_FILTERS:BillingEmbedInsightFilter",
"FV"
); This example replaces the Bills by Bills Status dashboard with the Billing Analysis dashboard in Full View mode. The specified application class applies the initial filters.
Example 2: Switch to the default Tile View mode.
SwitchInsightsDashboard(
"Bills by Bills Status",
"Billing Analysis",
"",
""
);This example replaces the configured dashboard with Billing Analysis. Because the mode value is blank, PeopleTools uses the default mode, TV.