Forum Discussion
5 Replies
Sort By
- RobbSalzmannValued 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
- aformentiContributor II
Alternatively, if you need to remain in the same page, you should be setting the content of the Dashboard through a parameter like this:
Then you need to create a Embedded Dashboard component and pass in your Param:
Finally, your Dashboard page should reference the Embedded Dashboard component which will be set up by the button click.
- pranav46Contributor II
We tried exact steps but somehow, it's not working. If we hard code the value to parameter, then it works but button is not able to pass the value to parameter.
Related Content
- 2 years ago
- 2 years ago
- 4 years ago