Tokens are used in Dundas BI to provide options for setting filters besides choosing specific data source values. Most filters provide a token menu containing options such as All or Null. For time dimension filters, additional tokens let you select relative date values such as Today, Current week, or Year to date.
All user types can create custom tokens for themselves, but Dundas BI administrators and Tenant administrators with the Create Token privilege can manage all tokens, including tokens built into Dundas BI, or create new tokens for other users to use.
2. Token types
|Attribute||Based on the user logged in||Current Account Name, Current Culture Name|
|Basic||Basic tokens||All, Default, Null|
|Data||Defined by querying an element of the data cube||First day, Largest order|
|Named Set||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||Defined using DundasScript, allowing unlimited flexibility||return TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, currentSession.TimeZone);|
You can create custom Named Set, Data, Relative Time, or Script tokens, while Attribute and Basic tokens are defined by the system but have options that can be set. There are also custom attributes you can define that can appear in token menus.
To create and manage tokens as an administrator, click the Tokens button in the Administration's Setup area.
Creating tokens as an administrator is the same as for other users except that you can create script and relative time tokens from this screen. You can also create and manage tokens for other users of the system and promote user defined tokens to global tokens.
Administrators can access additional options for tokens:
- Symbol: Optionally set a symbol to use when including this token as part of a URL query string.
- Token Association: When creating a token as an administrator, this will be Global by default and available for all users. If you want to have a tenant-specific or account/group-specific token, select the desired token association from the dropdown list, and then choose the tenant or account.
See Creating custom tokens for details on creating each type of token.
4. Rename or localize a token
You can specify different captions for a token to be displayed depending on the language/culture of the user who is logged in. This applies to all types of tokens, including the system-defined attribute and basic tokens.
Locate and select the token from the list in the Tokens setup screen and click the Edit button in the toolbar.
Click the caption link at the top of the edit dialog.
To rename the token for all users, change the text under Default; otherwise, click Add localized caption.
For a localized caption, enter the IETF language tag in the Culture field, and fill in the Caption field.
5. Promoting a custom token
You can promote a user created custom token to a global token.
Locate and select the token from the list on the Tokens screen and click the Promote button on the toolbar.
6. Checking references
For all types of tokens other than Basic, you can check for any files referencing the token in Dundas BI version 10 or higher, such as a data cube transform parameter, a metric set's filtering, or a view parameter or filter. This can tell you, for example, whether it's safe to delete the token.
Select a token and choose References in the toolbar. The References dialog will list files using the token, similar to the dialog you can access from a file's properties.
For custom attribute tokens, if you want to find instead which accounts/groups have values assigned to this custom attribute, you can check the references of the custom attribute directly.
7. See also
- Administration overview
- Adding filters
- Creating custom tokens
- Localization and multi-language support
- Using custom attributes to filter data by user
- Using the filter transform with tokens