Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Trigger a button

Hi,

Any idea how to trigger a button when selection box is being select?

1 Solution

Accepted Solutions
Not applicable
Author

Hi Hi,

Thanks for the reply. Actually what I want to achieve is..

Refer to image below, Year Selection and Pivot Table 2 are with alternate state : State1.

When user click on Client A, both pivot table will result for Client A. When user choose Year = '2011', pivot table 1 will still remain the same but only pivot table 2 reflect the result.

Previously I coded the expression in pivot table 2

sum({State1}Amount)

When I choose another client, but only Pivot table 1 result as another client but not pivot table 2.

Why I want to trigger button is because when I select Client A, a button can trigger automatically and copy the state result to State1.

Anyway, I managed to solve it by using the below code,

sum({State1<Client=$::Client>}Amount)

Capture.PNG.png

View solution in original post

6 Replies
Anonymous
Not applicable
Author

hi CS,

Could you please give more detail about what you need?

Regards,

Anonymous
Not applicable
Author

Do You want to show a button on selection of some field and hide it when its unselected.

If yes , then on layout tab of button , in conditional show write,

if(getselectedcount(field name)>0,1,0)

Regards

Nitin

suresh_rawat
Creator II
Creator II

Hi C.S,

Use Trigger in Button :

1) In Button -> Properties - >General - > Text -> =if(vShow=1,'Hide Reports' ,'Show Reports ')[This msg you can customize it]

2) In Button - > Properties - > Action - > Set Variable

- Eg - Variable - vShow (This Variable you have to create in Setting -> Variable Overview)

     Value - =if(vShow=0,1,0)

3) In Chart -> Properties - > Layout -> Show - > Condition -> vShow = 1

With this Setting you can Hide and show your chart.

Hope this will help you.

For any other detail, you can raise your question here

Regards

Suresh Rawat

Not applicable
Author

Hi Hi,

Thanks for the reply. Actually what I want to achieve is..

Refer to image below, Year Selection and Pivot Table 2 are with alternate state : State1.

When user click on Client A, both pivot table will result for Client A. When user choose Year = '2011', pivot table 1 will still remain the same but only pivot table 2 reflect the result.

Previously I coded the expression in pivot table 2

sum({State1}Amount)

When I choose another client, but only Pivot table 1 result as another client but not pivot table 2.

Why I want to trigger button is because when I select Client A, a button can trigger automatically and copy the state result to State1.

Anyway, I managed to solve it by using the below code,

sum({State1<Client=$::Client>}Amount)

Capture.PNG.png

Anonymous
Not applicable
Author

Hi CS,

here i attach the example hope it can answer what you need

Regards,

Not applicable
Author

Yes, actually I  already solved the issue. Thanks!