Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jzimolong
Creator II
Creator II

Capture ListBox Selections in separate variables

I was able to store a single listbox selection into a variable using =GetFieldSelections([$Field]).  If a user selects multiple values, how can I store each listbox selection in a separate variable?

1 Solution

Accepted Solutions
Not applicable

See if this is what you have in mind.

View solution in original post

5 Replies
Not applicable

It depends what you are looking to accomplish.  If you have a static number of selections to be made into variables, you can use SubField(). See attached. 

Maybe you can provide some more clarification, though, because I am betting there is an easier, less tedious, way to solve your problem than this method.

jzimolong
Creator II
Creator II
Author

Thanks Rebecca, this was helpful.  What I'm trying to do is setup a chart that has dynamic dimensions.

  • I first created a listbox of all the fields available in the application, using =[$Field]
  • When user makes single selection of a field, it stores the single selection in variable using v1=GetFieldSelections([$Field]), and the chart uses that variabe as a dimension.  This works great.

However, the user asked if they could select multiple fields in the list, and have the chart create multiple dimensions based on their selections.  This is where I started researching a way to capture each selection into a separate variable, then create conditional dimensions in the chart based on whether the variables were filled in or not.  I just want to get this working if the user makes 2 selections in the list box.

Hope this makes sense as to what I'm trying to accomplish.

Not applicable

See if this is what you have in mind.

jzimolong
Creator II
Creator II
Author

I was thinking about something like this on the way home.  I like it.  It's cleaner and once I get this setup, easy to manage.  Trying to capture multiple selections in a list box (in variables) was getting to be too complicated for it's own good.  I like the idea of creating inline tables for the dimensions and expressions, very slick!  The enabling based on conditions is pretty cool.

Appreciate your time and creativity.

Not applicable

I tried this expression in list box ='$(=GetFieldSelections($Field))' so when i select the field name in another listbox. i could see the values of the selected in the another list box with this expression.