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

Auto select last selected year

Hi guys,

i have a question, i want to auto select last selected year. When i select "year" field in the application for example i select "2015" then i close the application. When i open again the application i want 2015 is selected automatically. Is it possible to make it ?

Really appreciate your help guys. Thanks

Regards,

Indra

12 Replies
Chanty4u
MVP
MVP

use bookmark..or else use on leave event trigger

may be it helps.

Thnaks

Suresh

Not applicable
Author

Hi Suri,

Suri, can you give me an example please ? I can't find "ON LEAVE" in document trigger

Thanks

aveeeeeee7en
Specialist III
Specialist III

Hi


Use Triggers. There are 2 ways to achieve that:

1. Sheet Level Triggers:

Go to any Tab/Sheet and Right Click on that >> Click on Triggers >>

Click on Add Action(s) >> Click Add >> Selection Type: Selection >>

Action: Select in Field >> Next Step >> in Field: YearField >> in Search String: Max(Year(Today()))

2. Application Level Triggers:

Go to Document Properties (Control+Alt+D) >> Go to Triggers >> Select On Open >> Add Action >>

Rest follow above Steps to Apply Triggers.

This will fulfill your requirement.

Regards

Aviral Nag


Not applicable
Author

Hi Aviral,

I want to get last selected value not today's Year. For example i select 2014 on year field, then i close the application, when i open the application again it will select 2014 automatically, is it possible Aviral ?

Thanks

hariprasadqv
Creator III
Creator III

You may use triggers and Bookmarks.

Not applicable
Author

hi Hari,

can you give me an example Hari ? i dont have any idea about that

Thanks

Chanty4u
MVP
MVP

hi indra,

in UI  u create a list box with year field.

you select what you want the year

and go to bookmarks which is avil in menu bar and select the year and select ADD Bookmark

nxt go to sheet properties go to triggers onActivate sheet -->Add-->Bookmark--->Applybookmark

there give Bookmark id ..it avil in bookmark tab -->more option.

thats it close the application and open

that is uaa requiremnt  hope this helps to u.

Thank u

Suresh

Not applicable
Author

Hi Suresh,

i have try using bookmark, but it doesnt work.

when i close and open the application, it is not select last selected value.

I attach my file here.

Thanks Suresh

Not applicable
Author

hi,

Any way u r using year filter in Listbox,

Then  r-click on listbox -> go to properties -> in general tab u can see a check box called "always one selected value"

u can click on that.

It will help u complete u r task.

thank you,