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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Test Calendar Problem

Hello I've been using the example of Nick Bor of a Calendar that displays a range of dates.

Aparently, I have the same example. And I've added the triggers in the properties of the document.

Both triggers (minDate and maxDate) are based in Nick's example way like this :

=if(len(GetFieldSelections(Date)), vStartDate)

But in my case I have a date field called "Fecha Registro" and vStartDate is minOrderDate, so the result would be :

=if(len(GetFieldSelections([Fecha registro])), minOrderDate)

It should work but nothing happens when I click into the field. Any Ideas??.

Thank you very much in advance.

1 Solution

Accepted Solutions
Not applicable

John,

This min and max functions will ALWAYS provide SOME data for variables. It means you will see some selections in calendar objects what is not good when you click on CLEAR or CLEAR ALL button.

Marcel,

Take a look at fixed solution in attachment.

View solution in original post

6 Replies
Not applicable

You have to check my example for triggers on vStartDate and vEndDate variables.

johnw
Champion III
Champion III

In your example, you are not selecting Fecha registro. The values in Fecha registro are merely possible, not selected. So getfieldselections([Fecha registro]) won't return anything.

If that was fixed, you would then set variable minOrderDate to variable minOrderDate. In other words, even if you were checking the right condition, you're doing nothing. I suspect you instead want to set it to min([Fecha registro]).

Not sure what condition you're really trying to check. I probably wouldn't even check any condition. So I'd use these expressions:

=min([Fecha registro])
=max([Fecha registro])

Your variables are then set based on the selections. However, I have no clue if that's what you wanted.

Not applicable

John,

This min and max functions will ALWAYS provide SOME data for variables. It means you will see some selections in calendar objects what is not good when you click on CLEAR or CLEAR ALL button.

Marcel,

Take a look at fixed solution in attachment.

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thank you Nick, now it works fine. But I still don't know what have you changed to get it work. Could you tell me what have you changed?

Many thanks Nick.

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thanks Nick and John for your useful help.

Nick, I found what have you changed. It was in the Triggers tab in the properties document option. My problem was that I thought you only change the first option : "document event procedures". Now I see you change the values of the variables as well in the option "variable event procedures".

I'll show you better with a picture :

And the expression you have to add to make it work :

See you around !!!

Not applicable

That's right.