Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
MalcolmCICWF
Creator III
Creator III

A Button to Progress the Selection of a List Box?

So I have a question about selection boxes. This sounds like something that should be doable, but I am not sure where to start.

Is there a button selection that can be used so that when it's clicked, it moves down to the next selection in the list box for you?

I have a list box on one of the reports I create that has a wide variety of data to select. When my end users use this list box to select the criteria, they have to scroll back down the list to find the next client. A lot of these clients are the same until the 4th or 5th character and can be confusing to navigate or remember which one was selected last.

1 Solution

Accepted Solutions
veidlburkhard
Creator III
Creator III

Hi Jeremy,

I had a look into your app. You did everything right.

There are two things which could be improved to get you to your goal.

i) "In my example the field's name is 'Modelname'. Which is sorted alphabetically ascending before having been loaded." I think this is the key! Looking into your app shows me the field major is not sorted.

I cannot do this because this needs a reload...but you can try.


ii) The sorting in your multibox for field major should be "Only({1}MajorRank)" and not "Only({1}Major)".

Hope this helps

Burkhard

View solution in original post

12 Replies
ecolomer
Master II
Master II

If not, or you pose is really useful.

You have many ways to go about selecting the possible values ​​of the list box.

Maybe if you explain me a little more about the needs, we can help you better

MalcolmCICWF
Creator III
Creator III
Author

I don't understand your first sentance and I realize there are many ways to select possible values, that's why I am asking about this particular one.

I don't know how to explain better than I need a button to cycle to the next possible value in the list box...

richard_chilvers
Specialist
Specialist

Try investigating the sort order of your List Box. Often, when you create a List Box, the default is for selections to be put at the top of the list. It seems to me that you'd prefer the current selection to be left in alphabetic/numeric order.

It might help.

regards

veidlburkhard
Creator III
Creator III

Hi Jeremy,

if you don't want to scroll with your mouse through the possible values, you can mark the caption and key in the first characters of your desired value. The list box will then show you all the values with the characters you keyed in.

Also it make sense to use bookmarks for the most often reused selection. If you want, you can easily use buttons for these bookmarks.

A third possibility is to go to the 'Presentation' tab and uncheck 'Single Column. With this done, you can arrange the listbox in order to show several columns instead of one, only. This may help your customer to get a better overview of the possible selections.

Hope this helps

Burkhard

MalcolmCICWF
Creator III
Creator III
Author

This may be helpful, yet it is not what I want to try and acomplish. I understand what you are talkin about, but there is nothing in the sort tab that I see to control this.

MalcolmCICWF
Creator III
Creator III
Author

These are all great suggestions, but I am searching for a specific answer or example that someone has gotten to work. It is a Multi Box drop down with around 100 values. If I select a field in this Multi Box, is there an action or macro where I can click a button to progress to the next value for that field?

Example, take the current selection in "X" field, move to the next value.

veidlburkhard
Creator III
Creator III

Hi Jeremy,

seems you are insisting on your kind of solution!

So let's try to fix it.

We'll do it in two steps.

i) The script

See this example:

SET Hideprefix = %;

RankModelName1:

LOAD Modelname,

  AutoNumber(Modelname) as ModelRank

Resident ModelName; //Your fact table with the field you want the comfortable selection for.

RankModelName2:

LOAD Modelname as %Modelname,

  AutoNumber(Modelname) - 1 as ModelRank

Resident RankModelName1;

RankModelName3:

LOAD Modelname as %Modelname2,

  AutoNumber(Modelname) + 1 as ModelRank

Resident RankModelName1;

Where instead of 'ModelName' you should use the name of your fact table with the field 'Client' or whatever name it may have. In my example the field's name is 'Modelname'. Which is sorted alphabetically ascending before having been loaded.

As you can easily see you create a ranking and two new fields %Modelname and %Modelname2 with the same values as the field Modelname. Also the ranking in 'RankModelName2' and 'RankModelName3' is shifted against the original ModelRank by +/- 1.

This is the related data model:

ButtonSelect_DataModel.jpg

ii) UI

In your user interface you can now easily creat the buttons which behave exactly the way you asked for.

First we create the button 'Push for next selection'.

You can do this by adding these two actions to your button:

Actions: Select Possible, Field:%Modelname

Actions: Select in Field, Field: Modelname, Search String: =Concat(Distinct %Modelname)

Every pressing of the button moves your selection to the next value of your field. Be it in a lisbox or multibox.

Now we create (as a bonus) the button 'Push for previous selection'.

Add a new button with these two actions:

Action: Select possible, Field: %Modelname2

Action: Select in Field, Field: Modelname, Search String: =Concat(Distinct %Modelname2)

ButtonSelect_UI.jpg

That's it. With these two buttons your customer can go step by step selecting the values of your field forward and backward. I used the SET Hideprefix = %; statement in the script in order that the customer should not see the fields %Modelname and %Modelname2.

Hope this helps

Burkhard

veidlburkhard
Creator III
Creator III

Hi Jereremy,

I forgot to mention one thing: You'd better do the sorting in the UI like this

ButtonSelect_Sorting.jpg

Burkhard

veidlburkhard
Creator III
Creator III

Hi Jeremy,

is this the solution you wanted to have?

Regards

Burkhard