Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

variables do not work as expected

Hi

I working on creating variable on calender box

This what i ahve done:

1.Created 2 variable vStart and vEnd

2.Created triggers for - Select in Field , field name "day_date" and search criteria : Added the below criteria for vStart and vEnd for on Input and On change actions

='>=' & vStart & '<=' & vEnd

3.Created a Calender Box and assigned vStart Variable

4.Created a Calender Box and assigned vEnd Variable

What did i miss here , i dont find the DAY_DATE values reflected to selections made in the calender box ..Please Help

I tried giving Min and Max values as min(day_date) and Max(day_date) but it did not work.What should be the min and max values for the variable here >

Please Help...

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

The mistake here is related to the data format. If you uncheck the "Override Document Settings" in the number properties of your list box, you can see that the format is timestamp. At the same time, the data format of the variables in selection is integer. Hence, selection doesn't work, no matching values. To fix it, one of the solutions is to change action definition to
='>=' & timestamp(vStart) & '<=' & timestamp(vEnd)

Another approach (wich I prefer) is to convert this field in the script to integer or whole date format.

View solution in original post

6 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Did you assign actions to the variables? See EnterDateFromToV9.qvw in this thread
http://community.qlik.com/forums/p/22315/102934.aspx

for a working example. It uses input boxes instead of Calendars, but the set up should be the same.

Anonymous
Not applicable
Author

Thank you , this works for me if i have input boxes, i replicated the same thing for calender box, but i cant select values from calender box , i mean i dont see all my calender dates.What should the min and max values for the valriables in calender box ,

my min value of date is 02/03/2003

my max value od date is 12/31/9000

Anonymous
Not applicable
Author

Rob could you please suggest me with the calender boxes , not sure what i am doing wrong , may be because my date range is big or something ...it works perfect with input boxes , but not in calender question.

I guess i am messing up while giving the min and max values for the calender boxes ..what should be the exact min and max values for calender boxes when a variable is select , my min and max dates for the column date are 02/02/2003 and 12/31/9000,

please suggest ....

renjithpl
Specialist
Specialist

try min value - 36526

and max value - 2593588

Regards

Renjith

Anonymous
Not applicable
Author

I tried the above . dont understand why my date values are NOT changing according to the values i select in the calender boxes.Nothing gets selected in date values......:-(

Please Help...

Anonymous
Not applicable
Author

The mistake here is related to the data format. If you uncheck the "Override Document Settings" in the number properties of your list box, you can see that the format is timestamp. At the same time, the data format of the variables in selection is integer. Hence, selection doesn't work, no matching values. To fix it, one of the solutions is to change action definition to
='>=' & timestamp(vStart) & '<=' & timestamp(vEnd)

Another approach (wich I prefer) is to convert this field in the script to integer or whole date format.