Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
Not applicable

Master Calendar with Alternate States

Hello,

I have assigned "Current Selections", "Year", "Quate", "Month", and all 4 textboxes to "State 1". I assigned "Default State" to "Start Date" and "End Date" objects.

I also created a master calendar and created variables and triggers.

TempCalendar:
LOAD
Date($(vStartDate) + RecNo()) as TempDate autogenerate $(vEndDate) - $(vStartDate);

MasterCalendar:
Load
TempDate as [Date]
Resident TempCalendar
Order By TempDate ASC;
Drop Table TempCalendar;

Before I use alternate state, it works. But after I assigned objects to State1, and when I choosing the "Start Date" and "End Date", the date values didn't show up in the "Current Selection" object and also didn't make any changes. So I am wondering how I could keep both master calander function and alternate state?

Thanks in advance,

Becky

1 Solution

Accepted Solutions

Re: Master Calendar with Alternate States

Seems to be working if you use this search string:

='>=' & Date(vMinDate, 'DD/MM/YYYY') & '<=' & Date(vMaxDate, 'DD/MM/YYYY')

View solution in original post

10 Replies

Re: Master Calendar with Alternate States

Do you have a trigger to select a date range from default state to alternate state?

Not applicable

Re: Master Calendar with Alternate States

Great point Sunny! I don't think I have one. So what should I do?

Select Trigger,  --> Field event trigger --> chosse the date field --> add Actions --> Select Field Action?

When I am adding Field Actions, what I should put in "Field", "Search String" and "Alternate State"?

Shall I put date field name in "Field"? "State1" in "Alternate State"?  What I should put in "Search String"?

Re: Master Calendar with Alternate States

Field = Date

Alternate State = State1

Search String -> ='>=' & Date(vStartDate, 'DD/MM/YYYY') & '<=' & Date(vEndDate, 'DD/MM/YYYY')

Re: Master Calendar with Alternate States

Question, is start and end date driven by a field or variables in your calendar object?

Not applicable

Re: Master Calendar with Alternate States

Thanks Sunny. I believe your approach is the correct one. But somehow I cannot get the result. Also, I cannot clear the date range in "Current Selection" object.

I think probably there are other settings went wrong. I attached a sample QVW file. Do you mind to take a look and let me know where went wrong?

Thanks!

Becky

Not applicable

Re: Master Calendar with Alternate States

Yes, the start and end date driven by the field "Receive_Date" in my sample qvw file. If that answered your question?

Re: Master Calendar with Alternate States

Seems to be working if you use this search string:

='>=' & Date(vMinDate, 'DD/MM/YYYY') & '<=' & Date(vMaxDate, 'DD/MM/YYYY')

View solution in original post

Not applicable

Re: Master Calendar with Alternate States

I am all set! Thanks Sunny!

Re: Master Calendar with Alternate States

Great