Using the Token Designer
Tokens are used in Dundas BI as a means of simplifying user input. On a dashboard, you can access the token menu of a parameter control and use it to select standard filter values such as All Values or Null. For time dimension filters, additional tokens let you select relative date values such as Today, Current week, or Year to date.
Dundas BI administrators and Tenant administrators, when they have the "Create Token" privilege, can modify the built-in tokens which are included with the application, or create new custom tokens such as Last 40 days or Current Quarter.
From the Administration menu, click the Token Designer button to launch a designer screen that lets you modify built-in tokens or create new ones.
2. Token Types
|Attribute||Tokens based on the log-in credentials||Current Account Name, Current Session ID|
|Basic||Basic tokens||All, Default, Null|
|Named Set||A token defined on a specific dimension hierarchy||USA, Canada, Paris|
|Relative time||Time based parameter token definition||Current Week, Last 30 days, Beginning of Today|
|Script||A token defined using expressions, allowing unlimited flexibility.||return TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, currentSession.TimeZone);.|
3.1. Relative Time token
Use the Token Designer to create a new Relative Time Token:
- Click the Relative Time Token button.
- In the New Relative Time Token panel, enter a Caption for the token.
- Optionally, add a symbol for the token.
- By default, the token association will be global. If you want to have a tenant-specific or account/group-specific token, select the desired token association from the dropdown list.
- For a Relative Time token, data type is locked to Date and Time Hierarchy.
- Select the Display Type. Select the "Range Full" since the Last 40 days token is a full date range time dimension.
To learn more about Token Range types, refer to the Set Date range in a Time Dimension using Tokens example.
- Since a full date range is selected, select the start and end member granularity and offset.
- Click the Submit button to create the token and refresh the Token Designer screen.
3.2. Named Set token
To create a new Named Set Token:
- Select filter values from the hierarchy filter:
- From the the hierarchy filter controls' token drop down list, select Save Selection as Token.
- Create the Named Set Token. Access can be controlled by setting the Token Association (Global, Tenant, Account). In this example, Global is selected.
- Result: User(s) with access to the dashboard and token should be able to see and use the named set token from the hierarchy filter controls' token drop down list.
3.3. Add a localized caption
You can specify additional captions for the token based on culture. For example:
- Locate the token in the Tokens window and click Edit.
- Click the caption link at the top of the Edit panel.
- Click Add localized caption.
TipChange the Default text in this panel to rename the caption.
- Provide and language code in the Culture field.
- Provide the localized caption in the Caption field.
4. See also
- Set Date range in a Time Dimension using Tokens
- Localization and Multi-Language Support