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#:
Given the changes in the code, configure the dashboard service file in the following way:
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.
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:
-
In the Assemblies Files, right-click on Files and select Add File.
-
In the Add File Dialog Box:
-
Type a file name.
-
Set your Source Code Type to Dynamic Dashboards Service.
-
Set your Compiler Action to (Use Default).
-
Select OK.
-
-
Copy the following line of code that starts with GetDynamicParametersForDynamicComponent:
CopyGetDynamicParametersForDynamicComponent 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 -
Paste the code in the Dynamic Dashboard Service File that is producing the error.
-
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.