Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to use button to select year_ = 2012 ?

Hi All

May i know how to use the button to select year_ =2012 ?

=num(Year(Today()) -1)

I try above not able to work. any work around ?

1 Solution

Accepted Solutions
Not applicable

Re: How to use button to select year_ = 2012 ?

Hi Paul,

Check the attached QVW.

you need to use Right function to get it Selected.

Thanks,

Shruthi

7 Replies
Not applicable

Re: How to use button to select year_ = 2012 ?

Create A button

goto Actions -> Selection -> Select in field -> Year- Search string(2012)

hope it helps..

Not applicable

Re: How to use button to select year_ = 2012 ?

Hi Paul,

Check the attached QVW.

you need to use Right function to get it Selected.

Thanks,

Shruthi

Not applicable

Re: Re: How to use button to select year_ = 2012 ?

Hi sir

you code seen to work , but i need the year selected turn green. can you advise me how to make it turn green ?

Not applicable

Re: Re: How to use button to select year_ = 2012 ?

Hi sir

I need the code that is selection of current year for this year and next year when press the button.

Not applicable

Re: How to use button to select year_ = 2012 ?

Hi Paul,

you can check the attached QVW in my previous reply.

Since the Year is the listbox is showing oly 2 digits its not selceting.

so if use Right function, it selects and turns green.Hope this solves. similary for current year and next year.

Thanks,

Shruthi

Not applicable

Re: How to use button to select year_ = 2012 ?

Hi shru

yes i aware your qv doc send me turn green.

But In my actual qv application , i need to make some change of the list box. i need to add :-

=If(Year>1995, year_)

Check my  latest doc pls.

Not applicable

Re: How to use button to select year_ = 2012 ?

Hi Paul,

You are using a listbox with a calculated dimension, check current selections and you'll see that your action button makes a selection in the year_ listbox.

BR

Fredrik