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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
cgT
Creator
Creator

Changing Variable Value When Field Is Cleared Of Selections

Hi everyone,

I have a field called 'TransactionDate' which, when I clear it, needs to change the value of a variable, vLastWeekTrans, to 0.

I'm trying to use the current expression in the variable's 'Definition' box and am not getting any result:

=if(GetSelectedCount(TransactionDate)<1, 0,1)

Thanks in advance for any help. 

Labels (1)
10 Replies
cgT
Creator
Creator
Author

Hello,

I'm still unable to get the alternate state to work on the button. But I'm also having another issue. Without changing anything, I'm now seeing the button background and font changing only after a second click of the button. Also, the clearing of the field no longer sets the variable to '0'.

I've attached my app, sans data, for somebody to look at if possible please.

Many thanks for your help.