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

Announcements
Join us in Zurich on Sept 24th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
korn_Jr
Contributor
Contributor

Add a script in if statement which will confirm that a button is clicked

I have a button and I want to display a message in vizlib advanced text object when that button is clicked.

For that I have created a variable say vbutton.

For that button - actions and navigations -> In Action - Set variable value -> In Variable - vbutton -> In Value - b1

For Vizlib text object - In Text - if(vbutton = 'b1', "button clicked", "not clicked")
It shows "not clicked" even when I click the button, I knew I am not doing it in correct way, please help, I have tried whatever I knew.
I am still learning qlik sense.

Labels (1)
1 Reply
Aditya_Chitale
Specialist
Specialist

Try this:

if('$(vbutton)' = 'b1', 'button clicked', 'not clicked')

Regards,

Aditya