Forum Discussion

ABott73's avatar
ABott73
New Contributor II
2 years ago

Combo Boxes Passing Selections to Other Dashboards

Hi

I appear to be having a slight issue when trying to feed the user selection of multi combo boxes embedded in the main dashboard to other dashboards that the user would be navigating to (i.e. their selection on the main dashboard would be the default in the next dashboard).  I can currently only get it to work for one single combo box at a time?

I'm using a Dashboard Extender Rule which incorporates both the LoadDashboard function type (this is activated against a server task for the dashboard being navigated to) and the ComponentSelectionChanged function type (this is attached to each of the combo boxes as a changed server task)

Any advice on this would be much appreciated or if there is a easier way to achieve it?

Thanks

Andy

 

  • Since you have a load event, why not store this as session info, when the other dashboard opens get the session info, and set the parameter with this value?

    • SxD's avatar
      SxD
      New Contributor III

      Hi ckattookaran - Do you have an example or some resources that can guide me in the right direction of how to do this via session info? Thanks!

  • kevinmullen's avatar
    kevinmullen
    New Contributor

    I was running into a similar issue with selecting multiple items in a combo box and passing it in to the dashboard extender rule. Only the first item selected would write to the error log. I found a separate post on here (https://community.onestreamsoftware.com/t5/Rules/When-selecting-multiple-items-in-the-list-box-only-the-first-one/m-p/19788) that recommended the use of [ ] when passing in the named value pair into the dashboard extender rule and this appears to be working as expected! 

  • RobbSalzmann's avatar
    RobbSalzmann
    Valued Contributor II

    Hey Michel,  Wouldn't setting a Literal Parameter set the default for the combobox its bound to for all users?  I think Andy wants this for each user.

  • In addition to Robb's comment, you could also use the extender rule to set the value to a literal value parameter that can be read by the new dashboard

  • RobbSalzmann's avatar
    RobbSalzmann
    Valued Contributor II

     it may help to use the same bound parameter across multiple comboboxes that need to display the same default choice, or just use the same combobox with its bound parameter.  You can also pass the value of the combobox bound parameter to the Dashboard Extender rule by assigning it to an argument {DBExtenderRule}{ComboboxFunction}{combo1Val=|!pm_combo1val!|}.  Then assign it to another parameter in the rule:

     

    Dim taskResult As XFSelectionChangedTaskResult = New XFSelectionChangedTaskResult() With {
        .IsOK = True,
        .ShowMessageBox = False,
        .Message = "",
        .ChangeSelectionChangedUIActionInDashboard = False,
        .ChangeSelectionChangedNavigationInDashboard = False,
        .ChangeCustomSubstVarsInDashboard = true,
        .ChangeCustomSubstVarsInLaunchedDashboard = False
    }
    
    taskResult.ModifiedCustomSubvars("combo2Val) = combo1Val
    
    Return taskResult