Forum Discussion
RobbSalzmann
26 days agoValued Contributor II
To accomplish this you would use input parameters, not supplied parameters. Supplied parameters are generally for supplying initial state information.
Your requirement often involves the use of a Dashboard Extender business rule as well.
- chris-kenworthy12 days agoNew ContributorJake, did you get this figured out? If not, I am happy to help. I agree with Rob that you would use an input parameter that is bound to your list box (Bound Parameter property on your list box), then pass that value on the 'Selection Changed Server Task Arguments' property on your button component. It would look similar to below using the following syntax "{Business Rule Name}{Function Name}{Arguments}"{BusinessRuleName}{InitializeProjectDashboard}{ProjectId = |!param_ProjectId!|}From your screenshot, it looks like you already have this input parameter to display the selected project on the button.You will need to set your 'Selection Changed Server Task" property on the button to one of the 'Execute Dashboard Extender Business Rule...' options.You will also need to change your 'User Interface Action' properties on your button to open the new dashboard.Then, as Rob stated, you would use a Dashboard Extender Business Rule.Add a function that reads the project Id that you included in the button's 'Selection Changed Server Task Arguments' and add that to the selectionChangedTaskResult.ModifiedCustomSubstVars dictionary. Something similar to below:Public Function InitializeProjectDashboard(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardExtenderArgs) As XFSelectionChangedTaskResultTry'Set return objectDim selectionChangedTaskResult As New XFSelectionChangedTaskResult()selectionChangedTaskResult.IsOK = TrueselectionChangedTaskresult.ChangeCustomSubstVarsInDashboard = True'Get project Parameter ValuesDim projectId As String = args.NameValuePairs.XFGetValue("ProjectId")'Update paramselectionChangedTaskResult.ModifiedCustomSubstVars.Add("param_ProjectId", projectId)Return selectionChangedTaskResultCatch ex As ExceptionThrow ErrorHandler.LogWrite(si, New XFException(si, ex))End TryEnd FunctionThen In the 'Main' function add an Else If and capture you function name and then call the function you just created.Else If (args.FunctionName.XFEqualsIgnoreCase("InitializeProjectDashboard"))selectionResult = Me.InitializeProjectDashboard(si, globals, api, args)Return selectionResultEnd IfIf the project Id gets passed to the new dashboard but pops up in the default parameter screen, you can suppress this by creating a Supplied Parameter (spp_ProjectId), linking it to the param_ProjectId parameter and adding it as a component to the top level dashboard you are initializing.I hope this help.
Related Content
- 2 years ago