Author: Yurika Harada
Introduction
You can customize which Dashboard Page is open and which filters are selected by default when configuring a customized URL. The format of the link is shown below:
http://localhost:8888/${contributor-page}&appid=1&authid=1&subid=-1&mode=c&contextid=1
Tip: For more information on URL formatting, please refer to the App URL Structure article.
This can be achieved with the ContextOverrideFilter and ContextOverrideSettings tables by tying a ContextOverrideID to the desired selection(s). The next section will explain how to find the tables using SQL Server Management Studio (SSMS).
Context Override Tables
In SSMS, login as a System Administrator. Expand Databases > Kepion Application Database > Tables. In this case, we will use the Integrated Financial Planning Database.
Scroll to find [dbo].[ContextOverrideFilter] and [dbo].[ContextOverrideSettings]. Query the tables (example shown below).
ContextOverrideFilter Values
- ContextOverrideID: User assigned number to reference a set of filter selections and settings. Each set needs a unique ID.
- FormID: The ID for the associated Form. It can be found in the [dbo].[DashboardForms] table.
- InstanceID: The ID for a specific instance of the associated Form on the Dashboard. It can also be found in the [dbo].[DashboardForms] table.
- Dimension: The name of the Dimension in the filter.
- Hierarchy: The name of the Hierarchy in the filter.
- Selected: The MDX string of the selected member in the filter. The formatting of this value can be found in the [dbo].[Filter_Planning] table.
ContextOverrideSettings Values
- ContextOverrideID: User assigned number to reference a set of filter selections and settings. Each set needs a unique ID.
- Key: The name of the setting that is being configured.
- Value: The value required for the specified key.
The next sections will go more in-depth on how to find the required values.
Configure Default Filter Selection
In this section, we will discuss how to find the values needed for the [dbo].[ContextOverrideFilter] table. This will allow us to choose default filter selections when creating URLs for Dashboard Apps.
FormID and InstanceID
In the Table folder of your Database, scroll until you find the [dbo].[DashboardForms] table. Query the table.
Find the Dashboard of your choice by the Sheetname. Record the FormID and the InstanceID. Remember the DashboardID for the next section as well.
Note: If there are multiple Dashboard Pages with the same name, you may need to find the appropriate DashboardID from the [dbo].[Dashboards] table.
Selected
The last step of this section is to go to the [dbo].[Filter_Planning] table to note the MDX formatting for the selected member.
You will need to find the correct [Dimension].[Hierarchy].[Member] path for your filter. For this example, we will use the member Australia, from the Entity Dimension, which has a MemberID of 4. This information can be found in the Selected column.
Tip: To update the FilterPlanning table with the desired MDX string, select the required member in the filter in the Dashboard App and then select Post.
Once you have recorded all the required values, go back to the [dbo].[ContextOverrideFilter] table. Enter in the values you need.
In this example, if we specify a contextid of 9 in the URL, Australia will be selected in the Entity filter. If you want to select multiple filters with the same URL, add additional rows in the ContextOverrideFilter table with the same ContextOverrideID.
Note: The number of the ContextOverrideID is arbitrary and does not need to be any specific value.
Configure Default Page Selection
In this section, we will discuss how to find the values needed to configure the default landing page for the URL. Once the values are collected, we will enter them into the [dbo].[ContextOverrideSettings] table.
Value (DashboardPage)
First, we will need to find the value for the [dbo].[ContextOverrideSettings] table. This will be the DashboardPageID. Navigate to the [dbo].[DashboardPages] table.
Record the DashboardPageID for the chosen Dashboard App page.
Go to the [dbo].[ContextOverrideSettings] table. To open to a specific page, use SelectedPageId for the Key. Enter in the rest of the required elements.
In this example, if we specify a contextid of 9 in the URL, the Balance Sheet Page will be selected by default.
Create the URL
Once all the steps above are complete, the URL can be created. Make sure the ContextId is equal to the ContextOverrideId. The link for the example created above is here:
http://localhost:8888/${contributor-page}&appid=6&authid=1&subid=-1&mode=c&contextid=9
Follow the link to the app. Check that the link is working as expected.
Comments
0 comments
Please sign in to leave a comment.