Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
Not applicable

by default current month & year should be in my calendar object

Hi guys,

need help to get default  current month and year in my calendar object

i have added publish_date field to  my calender . based on  selection am getting results its fine..

but by defaults it's showing  sept month in 1996 year ,   i am expecting it should be  current month & Year.

i used trigger also but  its working one time (when i open the application).

can you please help me on this.

9 Replies

Re: by default current month & year should be in my calendar object

Hi,

go to sheet property->Trigger->On Open->Add trigger -> Select in Field

then give field Name and value become = monthname(Today())

Simliar for Year Field value become Year(today())

Great dreamer's dreams never fulfilled, they are always transcended.
Not applicable

Re: by default current month & year should be in my calendar object

Hi Max,'

Can you please explain  more briefly..

actually  i tried with  trigger -->on open

i given field name and value  given as today()

but its showing only whenn i opened my application first time  . next time onwards (if i select any date and clear)

it showing 1996 year

Re: by default current month & year should be in my calendar object

Hi,

If you want to show only current months and year data in the calendar object then create two variables

Let vMin = MonthStart(Today());

Let vMax = MonthEnd(Today());

And in calendar properties >> select vMin variable >> and in the

Min Value >> vMin and Max Value >> vMax

But it will display current month and Year dates only dynamically

Regards

Anand

Re: by default current month & year should be in my calendar object

Hi,

Considering for Clear  data you have Button On which Yor are fire the Clear all trigger

then for that button also you have add above two trigger.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Not applicable

Re: by default current month & year should be in my calendar object

Hi Anand,

NO, I don't want to restrict  to only current month... if user wants he can select any date ,,

but By default it should  show current month & Year

as like below image  when user clik  the calender object .. it should show   December  2014.

cal.JPG.jpg

Thanks & Regards

Damodhar

Re: by default current month & year should be in my calendar object

Hi,

Then create two fields based on the current datefield which is running on your model and on the basis of that create a table to find the Min and Max dates

LOAD Date(Min(DateField)) as MinDate, date(Max(DateField)) as MaxDate Resident Raw;

And create a variable Let vTodaysDate = Today();

And then in the calendar object use this variable vTodaysDate and in the min value MinDate and in Max MaxDate

calendarob.png

Regards

Anand

mahamedfaijan
Contributor II

Re: by default current month & year should be in my calendar object

Hey I need help;

I want calender object with month name as alphbetic in drop down of calender object.

But currently i am gettin it as numeric value as below screenshot :

Test.png

Kindly help ASAP

Re: by default current month & year should be in my calendar object

Hi,

If possible post your script.

Just required your variable defination script.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
ElizaF
Contributor II

Re: by default current month & year should be in my calendar object

Try the expressions below for the current year and month:

  =year(today(1))

  = month(today(1))

CurrentYearAndMonth.jpg

and via Actions assigned to the Document OnOpen Trigger.


Hope this helps.