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: 
kkkumar82
Specialist III
Specialist III

Document Trigger Requirement

Hi all,

I have  a dashboard with year, Quarter etc filters. The dashboard should open with by default the selection on the field year with current year value i.e. 2015.

For this I created a document trigger "on open " where I extracted year from today() and assigned to the field year.

Another requirement is if the user clicks clear then once again year filter should be selected with 2015.

I tried with "once change" trigger on field trigger "year" but unsuccessful.

Thanks

Kiran Kumar

1 Solution

Accepted Solutions
Not applicable

Hi Kiran,

There seems to be a bug when clear is made which activates the trigger. This seems to work for your requirement.

Tried assigning a value to the variable in addition to select year value, unable to make it work. Will try on that.

This post may help you

Trigger on clear?

Another way is to set clear state,but need to know a way of setting dynamic clear state(in your case latest year). Its on the clear button, but not as an action.

Thanks,

Sandeep

View solution in original post

11 Replies
awhitfield
Partner - Champion
Partner - Champion

HI Kiran,

you could create a custom 'CLEAR' button, which clears all selections and then reselects 2015 in the year field, see attached:

Not applicable

Hi Kiran,

Check if this worksout for you. Created a dummy variable and have set a trigger on change for selecting current year.

kkkumar82
Specialist III
Specialist III
Author

Thanks all,

I cannot have a button for this because we are using div integration of these charts into a web application and from UI side we are using a button which uses java script API for clearing, sandeep how the variable is used because I didnt see any value getting into it.

Thanks

Kiran Kumar

martin_dideriks
Partner - Contributor III
Partner - Contributor III

What about "Set clear state"? That would "reset" your selections.

//Martin

kkkumar82
Specialist III
Specialist III
Author

Where is this action ??

kkkumar82
Specialist III
Specialist III
Author

Hi all,

I am trying for a solution which I want to try with the clear option in Qlikview Desktop not with a button and seeing if there are any triggers in this case.

Thanks

Kiran Kumar

Not applicable

Hi Kiran,

There seems to be a bug when clear is made which activates the trigger. This seems to work for your requirement.

Tried assigning a value to the variable in addition to select year value, unable to make it work. Will try on that.

This post may help you

Trigger on clear?

Another way is to set clear state,but need to know a way of setting dynamic clear state(in your case latest year). Its on the clear button, but not as an action.

Thanks,

Sandeep

antoniotiman
Master III
Master III

Hi Kiran,

in Document Property,trigger,field,modify You add

=If(GetSelectedCount(Year)=0,$(=Year(Today())))

Regards,

Antonio

kkkumar82
Specialist III
Specialist III
Author

I got it , but I have a doubt about security using macros in integration.

Is there a real problem using macros in Qlikview desktop or Access point or Integration, I have to know , to use this solution.

Thanks all for ur immediate suggestions