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

Range of values in Input Box constraints

Hello, I have an input box that is holding a year value (vYear). I want to be able to select the possible years in a drop-down, which I can do by going to the Constraints tab of the Input Box and checking the "Predefined Values Only", "Predefined Values in Drop-down", and "Listed Values" checkboxes. I can then set the Listed Values to my range of possible values, such as:

2008;2009;2010;2011;2012;2013;2014;2015;2016;2017

However, whenever I get updated data, I have to return to this constraint to update it. What I would like to do is be able to dynamically create this range of values by giving a min and max year and then have the range created for me. For instance, if my min year is 2008 and my max year is 2017, then it will create the string above. I already have the min and max values stored in separate variables (vMinYear and vMaxYear), so I just need a way to get this value. Is there an easy way in QlikView to calculate a range like this?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Use an expression for the Listed Values option: =Concat(ValueLoop($(vMinYear),$(vMaxYear)),',')


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Use an expression for the Listed Values option: =Concat(ValueLoop($(vMinYear),$(vMaxYear)),',')


talk is cheap, supply exceeds demand
dselgo_eidex
Partner - Creator III
Partner - Creator III
Author

Awesome! I didn't know about the ValueLoop function, but that is exactly what I needed. Thanks Gysbert!