Dynamic Dashboards Service Type

Dynamic dashboards allows you to modify components within the dashboard as well as modifying the dashboard itself.

Create a Data Set Service Type assembly file after the Service Factory file has been created. Here is an example of a dynamic dashboard service type in C#:

Sample Service Factory with a DynamicDashboard that has a yellow highlight line on lines 31-32.

Given the changes in the code, configure the dashboard service file in the following way:

Add File dialog box to configure the assembly file that features the file name, source code type, and compiler action.

NOTE: The file name should match the return function in the Service Factory file.

The example below shows embedded components that have not been created manually in the workspaces interface but that are generated by the assembly file.

Sample of an dynamic dashboard generated assembly file with a red rectangle box around attributes.

Before writing the assembly, ensure the Dashboard Type property is set to Embedded Dynamic. The rule will not run if you forget this step. This is also where you should ensure the Workspace Assembly Service property is set to the Service Factory assembly file.

There is no special syntax required for referencing this service type.

If you are writing a Dynamic Dashboard Service Type using VB.Net, and it implements IWsasDynamicDashboardsApiV800 from Platform Release 8.2 or previous versions, when you are compiling or running a dashboard, you will receive this error message:

To compile successfully in VB.Net, follow these steps:

  1. In the Assemblies Files, right-click on Files and select Add File.

  2. In the Add File Dialog Box:

    1. Type a file name.

    2. Set your Source Code Type to Dynamic Dashboards Service.

    3. Set your Compiler Action to (Use Default).

    4. Select OK.

  3. Copy the following line of code that starts with GetDynamicParametersForDynamicComponent:

    Copy

    GetDynamicParametersForDynamicComponent VB.Net Code

            Public Function GetDynamicParametersForDynamicComponent(ByVal si As SessionInfo, ByVal api As IWsasDynamicDashboardsApiV800, ByVal workspace As DashboardWorkspace, _
     ByVal maintUnit As DashboardMaintUnit, ByVal dynamicComponentEx As WsDynamicComponentEx, ByVal customSubstVarsAlreadyResolved As Dictionary(Of String, String)) _
     As WsDynamicParameterCollection Implements IWsasDynamicDashboardsV800.GetDynamicParametersForDynamicComponent
     Try
     If (api IsNot Nothing) Then
     Return api.GetDynamicParametersForDynamicComponent(si, workspace, dynamicComponentEx, String.Empty, Nothing, TriStateBool.Unknown, WsDynamicItemStateType.Unknown)
     End If
     Return Nothing
     Catch ex As Exception
     Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
                End Try
     End Function
  4. Paste the code in the Dynamic Dashboard Service File that is producing the error.

  5. Select Compile Assembly to compile the Assembly File.

IMPORTANT: You can utilize new functionalities within Platform Release 8.2 and later versions for service types in C#. While new coding options will work successfully in C#, these new functionalities in Platform Release 8.2 or later may not be compatible with VB.Net.