Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

multiple button actions not working as expected

Hi,

I have a very common issue. I have to clear a field on button action and then select the same field on the same button action.

Two actions have been added:

1. Clear field :   Say Month

2. Select in Field : Month       Value: concat({<Flag_YTD={'1'}>}Month )

3.Set Variable : vCount          Value : count(distinct ({<Flag_YTD={'1'}>}Month)

We have time periods buttons QTD and YTD.

So as I move from QTD......to YTD.

say in QTD vcount was 1. Even in YTD vCount is coming as 1.

If I double click on the button . It works.

Does anyone has any solution to this issue .

6 Replies
antoniotiman
Master III
Master III

Hi,

try

Select in Field : Month

Value :

='('&count(distinct ({<Flag_YTD={'1'}>}Month,'|')&')'

Regards,

Antonio

Not applicable
Author

Hi Antonio,

You did not get my issue. I am able to select the Months.

But vCount is not getting refreshed.

Thanks

Anonymous
Not applicable
Author

Hi ,

  Can you explain your issue clearly .

Not applicable
Author

attached a sample application for same.

When i move from test1 to test 2 .

vTest=0

If i gain press buttopn

VTest=8.

How can this be handled in one click

leni_harishwara
Partner - Contributor III
Partner - Contributor III

If possible can you share a sample file?

Regards,

Leni

marcus_sommer

Multiple actions within one button won't be mandatory executed sequentially in the order that they are determined - therefore you couldn't get a real stable solution with them if they are depending from eachother.

I think the reason is that they could be applied/calculated multi-threaded - and some of them might be faster as other (depending on further calculations on the machine and how the OS and qlik switched between the cores).

If it (always) worked by the second time I think it's caused by the qlik caching which avoids a new calculation and is faster. Maybe it could be helpful (for only one click) if you not calculate the selections-values within the action else within a variable and used then this variable for the action ...

- Marcus