Skip to main content
Member
Mar 31, 2023 1:03 AM UTC
Solved

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

mkohorstAnswer
Member
Mar 31, 2023 2:10 AM UTC

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

 

5 replies

mkohorstAnswer
Member
Mar 31, 2023 2:10 AM UTC

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

 

Member
Apr 3, 2023 12:26 PM UTC

Thanks this worked perfectly.

Member
Apr 3, 2023 10:39 PM UTC

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

 

Member
Apr 4, 2023 1:13 PM UTC

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

Expert
Apr 6, 2023 12:34 AM UTC

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