Skip to main content
June 21, 2024

How to open a Dashboard within the same page when button is clicked

  • June 21, 2024
  • 2 replies
  • 0 views

Hi,

Is there a way to open a dashboard within the same page of a dashboard by clicking a button in OneStream?

Thanks

2 replies

June 21, 2024

HI 100Rub ,

Not sure if that is exactly what you fishing for. But you can either:

Create Button to Open in a Dialog

2024-06-21_10-40-07.png

Open in a New Page

2024-06-21_10-43-36.png

June 21, 2024

Alternatively, if you need to remain in the same page, you should be setting the content of the Dashboard through a parameter like this:

aformenti_0-1718963594432.png

Then you need to create a Embedded Dashboard component and pass in your Param:

aformenti_1-1718963758456.png

Finally, your Dashboard page should reference the Embedded Dashboard component which will be set up by the button click. 

December 2, 2024

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.

 

 

 

April 25, 2025

Dynamically updating a displayed dashboard within a frame:

  1. Create a parameter that holds the name of the dashboard you want to display e.g. prm_displaydashName. 
  2. Create a dashboard called "PlaceHolder"
  3. Place the embedded dashboard component created for "PlaceHolder" as a component in the frame where you want to control e.g. 0_OuterFrame
  4. In the placeholder embedded dashboard properties, set the Embedded Dashboard property to the parameter for step 1. |!prm_displayDashName!|
  5. Create a dashboard extender br to handle the button click e.g. DashDisplayHelper *see below
  6. In the Button used to change the displayed dashboard, pass in the name of the dashboard to display by updating
    1. Server Task - Selection Changed Server Task to : Execute Dashboard Extender Business Rule (General Server)
    2. Server Task - Selection Changed Server Task Arguments: {DashDisplayHelper}{UpdateDisplayedDashboard}{dashboardToDisplay=|!prm_displayDashName!|}
    3. User Interface Action - Selection Changes User Interface Action: Refresh
    4. 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