Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar

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
sunny_talwar

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

Not applicable
Author

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"?

sunny_talwar

Field = Date

Alternate State = State1

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

sunny_talwar

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

Not applicable
Author

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
Author

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

sunny_talwar

Seems to be working if you use this search string:

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

Not applicable
Author

I am all set! Thanks Sunny!

sunny_talwar

Great