Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to create a trigger to effect a calender object and link both off them???

hi all,

please can anyone help me in solving the below issue?

I have a calender object with many dates.I want to link a trigger to this to set a default date to this calender object.
(some formula abc stored in a variable)

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Use another trigger. Field Event Trigger->On Change->Select in Field->Date1, search string:

=MonthStart(AddMonths(Today(),1))

View solution in original post

10 Replies
Not applicable
Author

can anyone please help me out for the above issue??????????????????????????????????????????????????????????

tresesco
MVP
MVP

Depends on how you created the calendar. Is there a field? ..?  Better, try to post your sample qvw.

Not applicable
Author

Hi Tresesco,

sorry may be my question was confusing,I will make my question much clearer.

You can check the below eg file attched for my doubt

Here the calender object consists of a field called'date1' so all the dates are shown and we can select it to whatever we want.

Now I want a default date to be set for the same as the "first day of the next month" which can be achieved by the formula
MonthStart(AddMonths(Today(),1))) .

But how to do this??? I want the default date always to be shown when I open the application but the list of other dates also should be available for a user to check for which ever date he/she wants to.

Please can you help me now in resolving this?????????????????

tresesco
MVP
MVP

Create 'On Open' trigger ->Select in Field->... like attached sample

Not applicable
Author

Hi Tresesco,

Thanks for the resolution.Is it possible to make this default?? because when I do a clear everything goes off,which should not happen here and default date should be still visisble .Can this be possible???

tresesco
MVP
MVP

Select a date from Date1 field, then right click->list box properties->general tab-> Select 'Always One Value Selected'.

Not applicable
Author

hi,

Yes it works,thanku ....

but after selecting some other date and then if I click clear it does not return back to the default date calculated it remaons in the same date whatever is selected.can this also be made possible????

on opening file and at the first clear when its showning default itself this is working but not when some other date is selected

tresesco
MVP
MVP

Use another trigger. Field Event Trigger->On Change->Select in Field->Date1, search string:

=MonthStart(AddMonths(Today(),1))

Not applicable
Author

Thanks a lottttttt  Tresesco....

Thanks for patiently teaching me something new... I have learnt something new in Qlikview today