Forum Discussion
RobbSalzmann
22 hours agoValued Contributor II
Dynamically updating a displayed dashboard within a frame:
- Create a parameter that holds the name of the dashboard you want to display e.g. prm_displaydashName.
- Create a dashboard called "PlaceHolder"
- Place the embedded dashboard component created for "PlaceHolder" as a component in the frame where you want to control e.g. 0_OuterFrame
- In the placeholder embedded dashboard properties, set the Embedded Dashboard property to the parameter for step 1. |!prm_displayDashName!|
- Create a dashboard extender br to handle the button click e.g. DashDisplayHelper *see below
- In the Button used to change the displayed dashboard, pass in the name of the dashboard to display by updating
- Server Task - Selection Changed Server Task to : Execute Dashboard Extender Business Rule (General Server)
- Server Task - Selection Changed Server Task Arguments: {DashDisplayHelper}{UpdateDisplayedDashboard}{dashboardToDisplay=|!prm_displayDashName!|}
- User Interface Action - Selection Changes User Interface Action: Refresh
- User Interface Action - Dashboards to Redraw: 0_OuterFrame
Namespace OneStream.BusinessRule.DashboardExtender.DashDisplayHelper
Public Class MainClass
Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardExtenderArgs) As Object
Try
Select Case args.FunctionType
Case DashboardExtenderFunctionType.ComponentSelectionChanged
If args.FunctionName.XFEqualsIgnoreCase("UpdateDisplayedDashboard") Then
Dim dashboardToDisplay As String = args.NameValuePairs.XFGetValue("dashboardToDisplay", String.Empty)
Dim modifiedSubVars As New Dictionary(Of String, String) From {
{"prm_displayDashName", dashboardToDisplay}
}
Dim taskResult As New XFSelectionChangedTaskResult()
taskResult.ModifiedCustomSubstVars = modifiedSubVars
taskResult.ChangeCustomSubstVarsInDashboard = True
Return taskResult
End If
End Select
Return Nothing
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
End Class
End Namespace
Related Content
- 2 years ago
- 2 years ago
- 4 years ago