Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bashar_f
Partner - Creator
Partner - Creator

Use dynamically populated listbox to select ranges

Hi there,

I have an input box that has the following variables:-

Range 1 = 0

Range 2 = 500

Range 3 = 501

Range 4 = 1000

Range 5 =1001

Range 6 =1500

Range 7 =1501

Range 8 =2000

Range 9 =2001

Range 10 =3000

I'd like to have a list box that is populated with the above variables as follows when the user enters the ranges in the input box


Range 1 - Range 2             

Range 3 - Range 4             

Range 5 - Range 6               

Range 7 - Range 8

Range 9 - Range 10


I'd also like to select from the dynamically populated list box and i want it to reflect on a 2nd list box called Salary.


Load * Inline

[Salary

300

500

900

1000

1400

2000

2600

3000

]


So, if for example, the user enters Range 1 = 0, Range 2 = 500 and i select that, then only 300 and 500 would show up in the salary list box. is this doable? I tried using the Class function, but it has a fixed width, what i want to do is allow the user to specify the width for each line in the Ranges list box.


Any help is much appreciated.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be like attached sample?

View solution in original post

11 Replies
tresesco
MVP
MVP

May be like attached sample?

Digvijay_Singh

As you started like - 'I have an input box that has the following variables' . Did you mean like this -

593.PNG

Can you elaborate how you are selecting multiple ranges in the beginning? Can you select like 0 to 1500 , and if yes then how?

bashar_f
Partner - Creator
Partner - Creator
Author

Hi tresesco,

Thanks so much for the reply

This looks great! but would it be possible in the Range Listbox to have the value of the ranges written instead of the words Range1, Range2, etc...

Also, could you please add the functionality for the rest of the ranges in the expression in the salary listbox? I tried, but there is an error.

I'm sorry, but i'm still a beginner.

Kushal_Chawda

You can create the slider instead of 10 variable to select the range.

Or using input box with two variables ( From and To) you can populate your variable

see the attached

bashar_f
Partner - Creator
Partner - Creator
Author

Hi Digvijay,

yes, that's pretty much it.

we'd like the user to populate the selections in the ranges list box, so basically, he can write 0 in the vRange1 and 1500 in vRange2, which will result in having the first row = 0 - 1500, and he can select that and it will reflect on Salaries listbox.

Please don't hesitate if you'd like me to explain more.

bashar_f
Partner - Creator
Partner - Creator
Author

Hi Kush141087,

Thanks for the reply,

This is a great idea, except the width is not always fixed, which is why i'm putting 10 variables so that the user can have his custom list of ranges like the following

for example

200 - 800

1000 - 1500

1800 - 1900

2000 - 2700

3100 - 3200

as you can see, with this, salaries with 900 will never appear because there is no selection that includes 900,  same goes for 1600,1700. tresesco up above is on the right track.

tresesco
MVP
MVP

Why don't you use just two variables/inputs (say, To/From) that users input their range and gets data accordingly?

bashar_f
Partner - Creator
Partner - Creator
Author

Because then the width would be the same for all the ranges, so we're giving the user the capability of customizing the width for each range.

Kushal_Chawda

Then i think you can go for what tresesco has suggested