Search results

Configuring Custom Attribute

A custom attribute is a piece of code that functions as a parameter and can be replaced by users in a query. The attribute name is replaced by the code, which is saved for each user and used to render the dashboard.

Custom attribute hierarchy

Custom attributes can be defined at three levels:

  1. User level
  2. Group level
  3. Site level

The user level attribute takes precedence over the other levels. The group and site level attributes can be overridden at the user level. Additionally, the group level attribute can override the site level attribute.

User level attribute

This attribute can be set by the site admin for a user on the user management profile page. The user’s attribute listing will display the attributes inherited from the group and site levels.

User Level Add Custom Attribute Button

Group level attribute

This attribute can be set by the site admin for a group on the group profile page. The group’s attribute listing will display the attributes inherited from the site level.

Group Level Add Custom Attribute Button

Site level attribute

This attribute can be set by the UMS admin for a site on the site details page.

Site Level Add Custom Attribute Button

Adding custom attribute

Attributes are name-value pairs associated with users, groups, and sites (tenants).

Custom Attribute Window

Name – The name of the attribute.

Value – The value of the attribute

Description – An explanation of the purpose of this attribute.

Encrypt – Option to store the attribute as encrypted in the database, with the value displayed as dots in the grid.

Applying custom attribute for different users

Let’s consider the user James with the custom attribute value configured as Sectors IN (‘Industrial’, ‘Traffic’) and the attribute name as Sector.

Use custom attribute for user James

For the user Christ, the custom attribute value is configured as Sectors IN (‘Residential’, ‘Commercial’) with the attribute name as Sector.

Use custom attribute for user Christ

Uses of custom attribute

Custom attributes can be used in the following areas:

  1. Custom Query.
  2. Web Connection window.

1. Custom Query

Custom attributes can be used in a custom query by manually providing the required custom attribute name in the code view using the syntax:

Syntax: ${{:AttributeName}}

Use custom attribute in code view

Here, a simple dashboard is created for James, and the data is retrieved based on the condition for the column Sectors as given in the custom attribute Sectors.

Sample Dashboard for user James

For Christ, the data is retrieved based on the condition for the column Sectors as given in the custom attribute Sectors.

Sample Dashboard for user Christ

Note: Please refer to this Datasource connector page for instructions on creating a datasource using a custom attribute.

2. Data source Connection window

Custom attributes can be utilized within the Data Source Connection interface to set up the Dynamic Connection String interface for the External API.

SQL Data Sources Configuration

Configure the following properties:

  1. Username.
  2. Password.
  3. Servername.
  4. Port.
  5. Database.
  6. Maxrows.
  7. CommandTimeout.
  8. AdvancedSettings.

WebCustom

External API Dynamic Connection String Interface

Configure the following properties:

  1. URL.
  2. Header(s).
  3. Username.
  4. Password.

Dynamic connection

IntelliSense support has been implemented for custom attributes, allowing users to type ’$’ within the All SQL data source properties or web data source properties to display the custom attributes.

Intellisense Support

Note Custom attribute support is not available for connections using SSH or SSL modes.

WEB DataSources

Configure the following properties:

  1. URL.
  2. Header(s).
  3. Parameter(s).
  4. Raw.
  5. Username.
  6. Password.
  7. Servername.
  8. Database.
  9. APItokenbearer.
  10. Apikey.
  11. Hostname.
  12. Authtoken.
  13. Accesstoken.
  14. Authsecret.
  15. Authid.
  16. Accountid.
  17. AppId.
  18. Authentication.
  19. Sitetoken.
  20. Chainid.
  21. Cloudtoken.

WebCustom

IntelliSense support has been implemented for custom attributes, allowing users to type ’$’ within the web data source properties to display the custom attributes.

Intellisense Support

Note Custom attribute support has been incorporated for both internal and external site publishing of data sources. Additional features for downloading and uploading have also been enabled.

When uploading a dashboard to a different site with a custom attribute, ensure that you create the same custom attribute name and its corresponding value.

Use the following syntax for the custom attribute.

Syntax: ${{:AttributeName}}

Use custom attribute in web connection

When a simple dashboard is created, the data is retrieved based on the condition for the column id as given in the custom attribute sectors.

Use custom attribute in widget

3. Expression

We have provided custom attribute support for Expression. please refer Expression documentation.

Syntax: ${{:Custom Attribute Name}}

Use custom attribute in Expression

Use custom attribute in Expression

Note: Please refer to this Datasource connector page to create a datasource using a custom attribute.

4. Benefits:

  1. Be able to use the same connection string for creating/modifying multiple data sources with a single credential.
  2. Configure different connection strings for different users in both design and view modes of dashboards.
  3. Effortlessly move dashboards with different connection strings between various environments, such as development, staging, and production.
  4. Download and upload the same dashboards with varied data for different servers.

Publish dashboards across different tenants with different servers. 5. Create a single dashboard template and use it for multiple tenants with different source credentials seamlessly. 6. Maintain unique values for each user using user-level attributes. 7. Maintain common values for specific user groups using group-level attributes. 8. Maintain common values for all users at a site using site-level attributes.

Note

  1. The order of priority for custom attributes is as follows: user level = 1, group level = 2, site level = 3.
  2. When uploading a dashboard to another site or user level, ensure that the same custom attribute name is available at the new site or user level.
  3. When publishing a data source externally, verify that the same custom attribute name exists at the relevant site or user level.
  4. When granting access to User 1’s dashboard to User 2, ensure that the same custom attribute is available at the user level or site level.

Limitation

Do not allow the same custom attribute to be available in different groups if it is used in the data source.