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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

2 calendars - best practice

Hi all,

i my app i have to implement something like a switch to change the data field associated with my calendar:

By default my calendar is associated with the registration date of a person to an event. I need also to have the ability to associate the calendar with a start date of an event. I was wondering if there is any simple best practice approach to that.

Thanks a lot.

K

9 Replies
Not applicable
Author

Dear kalinkula,

You could work with a variable to get a dynamic association. Set up a variable (e.g. vTimestamp) and create a listbox with predefined Values (the names of the table name you want to use as a key).

Edit afterwards your script and add the line §(vTimestamp) as MasterDate.

Now the user can chose how he wants to associate the source_date with your calendar.

Regards

David

Not applicable
Author

Hi david,

thax for this hint - However, i am having dificulties to understand. I have attached a little sample file that illustrates my issue - maybe you can add your idea to it ?

In its current status the calendar is linked to registration dates of people registrating to events. The events themselves have start dates. In this case i want to switch the calendar to work with the start dates of the event table.

Thanks a million.

K

Anonymous
Not applicable
Author

I had some simular issue here ... I solved it using 2 calendar's which are randomly visible according to the requested calender type.

See attachement

Not applicable
Author

i read you oroiginal post about this topic - I would rather have something dynamically like Davin described...

Anonymous
Not applicable
Author

In my case this dynamical was not really the wish 😉 ... it's just another way to solve the problem

Not applicable
Author

Hi,

I edited your qvw and implemented first a real calender (adjust start/enddate if you need). You can see a Inputfield as Dropdown filled with the fieldnames StartDate and RegDate. Depending on what you chose it will adjust your association like you can see when you do ctrl+t after running the script.

I hope this was what you were looking for.

Anonymous
Not applicable
Author

I also try to understand what you did ... so the association is only changed during load?? That's not really flexibel is it . . . in this way the user cannot select between the date fields.

Not applicable
Author

Thanks, David.

It works - but it seems only to work with a reload - i have to agree to Anita - that is unfortunately not very flexible.

Any chance this works without a reload ?

Anonymous
Not applicable
Author

You could consider doing something with a seperate calendar, which is not connected to any other table.

This table you use to make the date selections, in the set analysis of the expression you could take over the selection made in the seperate calendar, using the calender which you need of want (you could do this with a variable or as in my last example with an inline loaded table with the options).

I did do something like that before . . . but in the set analysis you got a lot of different options and possibilities . . . it didn't made me a happy programmer 😉 . . .