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: 
knightwriter
Creator III
Creator III

Variables have changed to blank; 2 clicks

Hi All,

I have created a few different variables and have set them at 0, as of now some variables take a second click of the button to get the variable to 0 which will then allow my table to activate.

My question is, why does it now take to two clicks to activate my table? I have not knowingly changed anything!

Example:

=if(vLw =0,1,0)

5 Replies
sunny_talwar

Does this happen everytime you open the application? or is it while development?

May be there is a trigger on open which forces the vLw to be Null() or within the script you have LET vLw = Null();, so every time the app refreshes you end up having vLw as null which needs two click to activate.

Best,

Sunny

sunny_talwar

Did you happen to find the root cause of the issue yet?

alexandros17
Partner - Champion III
Partner - Champion III

if your variable is not assigned when your application starts then you first click and assign the first value (not the one that filters) then you click again and it filter. So check the variable value when you open the document.

Verify triggers and eventually set the starting value for the variable in the script

LET myVar =0;

let me know

knightwriter
Creator III
Creator III
Author

Yes I did actually.I checked the formulas and I had not included the variable formula in all the tables properties.

So originally, when I clicked once the variable when from blank to 0 and by clicking a second time the variable went from 0 to 1 therefore activating the table.

Since Ive included the value in all tables, the variable goes from 0 to 1 in a single click.

Hope that makes sense!

jonathandienst
Partner - Champion III
Partner - Champion III

Just change the expression around:

=if(vLw = 1, 0, 1)


When vLw is null, a single click will change it 1 (because 'null = 1' is false).

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein