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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Two triggers on one button?


Hi,

I have a button "per month/ per day" in most of my diagrams that is used to switch dimensions ("day" or "month")

=> There is a binary variable "v_per_day" for that purpiose that is either 1 or -1

=> The formulas are different and dependent on that variable

=> The button just multiplies the current value of the variable with -1 and sets that as new value

=> I have one additional trigger on the button, that is to take off the selection on the week which wouldn't make sense with the dimension "month"

=>=> Thus, when that button is pressed, one usually sees the twelve months of the year.

=> Now I'd like to have one more trigger, that is, however, only activated when the current dimension is "month" - I'd like then to put the week-selection back on when the user presses that button.

<=> However, I can't seem to put on the button two actions depending on the variable (take off the week-selection when "v_per_day" is 1 <-> when "v_per_day" is -1, put it back on)

Can anybody give me a hint how, if at all, that is possible?

The only alternative I can think of would be to use two buttons on top of each other - but since I have that button in every single diagram in every one of my apps, that would be quite a task...

Thanks a lot!

Best regards,

DataNibbler

1 Solution

Accepted Solutions
marcus_malinow
Partner - Specialist III
Partner - Specialist III

Add a 'Clear Field' action to your button, and in the Field specify 'if(v_per_day=1,'Week')'


Add another 'Select in Field' action - in Field specify 'if(v_per_day=-1,'Week')', and whatever value you want in the Search string box.

Marcus

View solution in original post

3 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

Add a 'Clear Field' action to your button, and in the Field specify 'if(v_per_day=1,'Week')'


Add another 'Select in Field' action - in Field specify 'if(v_per_day=-1,'Week')', and whatever value you want in the Search string box.

Marcus

datanibbler
Champion
Champion
Author

Thanks a lot!

I just forgot the inverted commas.

Now it works just fine.

Best regards,

DataNibbler

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Marvellous - glad to be of service 🙂