Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List Box Issue

I have a created a list box for Field "Year".  I currently have 7 Years if I list the " Year" field. I would see ,2016,2015,2014.......2009.

but users want to see only years Current, Current-1 and current-2.

I created a List Box with Expression

=If(Match(Year, $(vYearToday),$(vYearToday1),$(vYearToday2)), Year)and its working fine, I get 2016,2015 and 2014.

The problem is I looses the option of Always one selected value.  So when the dashboard opens none of the Years is selected ,I would like for it to always have one selected value.

How can I accomplish that

3 Replies
sinanozdemir
Specialist III
Specialist III

Hi,

You can put an onOpen trigger.

Go to -> Document Properties -> Triggers, and then select "Select in Field" action:

Capture.PNG

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

"Always one Selected" is not available when using <Expression>. I think your only alternative is to create an additional field in the load that contains only those two years. Or possibly not load the other year's data at all if users don't want to see it?

-Rob

maxgro
MVP
MVP

try with a trigger

select in field     Year

=If(Match(Year, Year(today()), year(today())-1, Year(today())-2, Year(today())-3 ), Year, year(today()))