Skip to main content
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Default period selection on opening document

Dear QlikViewers,

I'm looking for a solution to my problem.

When a user opens the document all the previous months of the current year should be selected.

I'm able to do so using a bookmark, and select this bookmark by the OnOpen trigger. Problem here is that I have to manually update the bookmark every month.

To make my life easier I'm looking for a solution that does this for me. Perhaps with a variable.

I already tried to use the OnOpen trigger on my year field (easy: year(today)) and month field (='<=' & '$(vPrevMonth)' ) (vPrevMonth returns 30-09-2016 for example)

This does the trick, however, in my month listbox the months are not properly selected (no green selection...) Future months are greyed out. So if the user looks very close he/she would be able to see that there is a 'active selection'. (Also visible in the Current Selection(s) box)

My question: what would be the solution to get a proper selection on opening?

3 Replies

Just put the on open trigger on the field instead of using a bookmark. Have you tried that?

Not applicable

I'm trying to put the trigger on the month field (resident Master Calendar: Month(TemDate)), but without succes.

I'm able to get a selection of a single month (vPreviousMonth = =date(MonthEnd(AddMonths(Today(),-1))) ).

But not the selection of all the months of this year 'till previous month. (Period selection)

I think it has something to do with the (date) format of my variable. Could that be the problem?

Not applicable

I solved my problem.

Issue was probably with the date/month format in my month field.


vPreviousMonth : =month(AddMonths( Today(),-1))

onOpen trigger:

Select in Field > Date_month > ='<='& num(vPreviousMonth)

This will make a selection of all the previous months on opening of the .qvw