Forum Discussion

Filip's avatar
Filip
New Contributor II
2 months ago

How do I change a parameter value in a dashboard?

Hi everyone,

I have a business rules that is triggered through a dashboard. This Business rule is looking at a True/False parameter.

How do I add the parameter to the dashboard and with a dropdown list showing the valid values (true/false) that can be used to save the value to the parameter?

Thanks in advance,

4 Replies

  • Chris-B's avatar
    Chris-B
    New Contributor III
    Hi Filip,
     
    You can create a combo box component and attach a parameter in the Bound Parameter property field. The parameter can be a delimited list parameter with display and value items True,False.

    The selected parameter value can be passed to the business rule with the Selection Changed Server Task Arguments e.g. {Boolean_SolutionHelper}{ReturnValueTest}{Boolean=[|!prmTrueFalse!|]}

    In your business rule you can set a boolean as per example below:
    If args.FunctionName.XFEqualsIgnoreCase("ReturnValueTest") Then
    Dim myBoolean As Boolean = args.NameValuePairs("Boolean")
    End If
    • Filip's avatar
      Filip
      New Contributor II

      Hi, 

      Thanks for your reply.

      I cant really get it to work. I have a combo box, but its is not showing the value of the parameter in the box. Just the True False in the drop down list.

       

       

      • RobbSalzmann's avatar
        RobbSalzmann
        Valued Contributor II

        "I cant really get it to work. I have a combo box, but its is not showing the value of the parameter in the box. Just the True False in the drop down list."

        If the parameter bound to your combobox has True, False in it, then True and False is  the value of the parameter when the dashboard is being loaded and the combobox is displaying those values.

        When the dashboard is interacted with in a way that runs a Dashboard Extender, then you can pass in the value of the parameter that the user chose via the combobox by passing an argument to the extender rule.  If the combobox's bound parameter is called prmCboTrueFalse, then you would pass its current value to the externder rule as UserTrueFalse=|!prmCboTrueFalse!|.  Then you can extract the value in the extender rule and deal with it there.

        if you want the combobox to show a previous user selected value, you have to set it by setting the value of prmCboTrueFalse via the SelectionChangedTaskResult in a Dashboard Extender rule prior to loading the dashboard.