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:
https://localhost:8888/${app-page}&appid=1&authid=1&subid=-1&mode=c&contextid=1
Tip: For more information on URL formatting, refer to our 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
1. Open SQL Server Management Studio as a system administrator.
2. Expand Databases > Target Database >Tables. In this case, the target database is Integrated Financial Planning Database.
3. Scroll to find [dbo].[ContextOverrideFilter] and [dbo].[ContextOverrideSettings].
4. 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 being configured.
- Value: The value required for the specified key.
The next sections will go into more 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. Knowing these values will allow us to choose default filter selections when creating URLs for dashboard apps.
FormID and InstanceID
In your database's Table folder, find the [dbo].[DashboardForms] table and query it.
Find your target dashboard by the Sheetname, and record the FormID and the InstanceID. We recommend noting down the DashboardID for the next section.
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
Go to the [dbo].[Filter_Planning] table and record the MDX formatting of 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. It 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, go to the dashboard app, select the target member in the Filter, and Post the form.
Once you have recorded all the required values, return to the [dbo].[ContextOverrideFilter] table and 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, so it 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.
1. Locate the [dbo].[DashboardPages] table.
2. Record the DashboardPageID for the chosen dashboard page.
3. Go to the [dbo].[ContextOverrideSettings] table.
4. To open to a specific page, use SelectedPageId for the Key.
5. Fill in the rest of the required fields.
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
Now, we can create the URL. Ensure the ContextId is equal to the ContextOverrideId.
Our final link for the example is:
https://localhost:8888/${app-page}&appid=6&authid=1&subid=-1&mode=c&contextid=9
We recommend verifying the link is working by using it to go to the app.