Forum Discussion

RandyThompson's avatar
RandyThompson
New Contributor III
2 years ago

Is there a way to Select All, Unselect All a Multiselect Combo-box parameter?

I am trying to use a dashboard button to Select All and Unselect All values in a Multiselect Combo-box which I am passing to a Spreadsheet (TableView) business rule. I have tried to run a Data Extender rule from a button that clears the data using the code below: 

Dim selectionChangedTaskResult As New XFSelectionChangedTaskResult()
selectionChangedTaskResult.ModifiedCustomSubstVars.Add("lv_BusinessChannel", string.Empty)
selectionChangedTaskResult.ChangeCustomSubstVarsInDashboard = True
' Set the Return value
selectionChangedTaskResult.IsOK = True
Return selectionChangedTaskResult

  • Not sure if this applies in your case, but a while back I switched from a combobox to a GridView with the Show Deselect All button enabled. The bound parm on the Grid View contains a delimited list of selections.

     

  • Krishna's avatar
    Krishna
    Valued Contributor

    Randy below is my code and it is working.. I created a button and add this function. I have passed the Param Name & empty string in the Dictionary and mine is multi select combo box

    Dim selectionChangedTaskResult As New XFSelectionChangedTaskResult()
    selectionChangedTaskResult.IsOK = True
    selectionChangedTaskResult.ShowMessageBox = True
    selectionChangedTaskResult.Message = "Clear Selection"
    selectionChangedTaskResult.ChangeCustomSubstVarsInDashboard = True
    selectionChangedTaskResult.ModifiedCustomSubstVars.Add("CC_PARAM",String.Empty)
    Return selectionChangedTaskResult

     

     

     

     

  • mkohorst's avatar
    mkohorst
    New Contributor II

    Not sure if this applies in your case, but a while back I switched from a combobox to a GridView with the Show Deselect All button enabled. The bound parm on the Grid View contains a delimited list of selections.

     

  • RandyThompson's avatar
    RandyThompson
    New Contributor III

    I spoke too soon.  I can select items from the grid view, but when I move to the next tab and then go back to the Business Channel tabs the values are cleared. Basically I can Multiselect items on the component however the selected values are not being saved.

     

     

  • mkohorst's avatar
    mkohorst
    New Contributor II

    I used something like this to collect the selections (using bound param): 

    Dim groupsString As String = args.NameValuePairs.XFGetValue("Groups", String.Empty)
    Dim groups As List(Of String) = StringHelper.SplitString(groupsString,",")

    Then I used these methods to manage state in a data table: BRApi.Utilities.GetSessionDataTable, BRApi.Utilities.SetSessionDataTable(si

    Wouldn't surprise me if there was another way to do this, but this worked for my use case.  Thanks Randy