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

RandyThompson
New Contributor III

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

1 ACCEPTED SOLUTION

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.

mkohorst_0-1680228602803.png

 

View solution in original post

5 REPLIES 5

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.

mkohorst_0-1680228602803.png

 

RandyThompson
New Contributor III

Thanks this worked perfectly.

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.

RandyThompson_0-1680561041805.png

RandyThompson_1-1680561296296.png

 

RandyThompson_2-1680561493827.png

 

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

Krishna
Contributor III

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

 

Kris_0-1680741257773.png

 

Kris_1-1680741280198.png