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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
rkpatelqlikview
Creator III
Creator III

How to clear the button selections

Hi

Please find the attached QVW. The selection should be clear when clicking on the clear. Color of the button should be normal.

Thanks

16 Replies
tresesco
MVP
MVP

Have you also set OnAnySelect trigger like I did?

Capture.JPG

rkpatelqlikview
Creator III
Creator III
Author

Now i did it.

If(len(getselectedcount())>0, RGB(0, 0, 255), RGB(192, 192, 192))

rkpatelqlikview
Creator III
Creator III
Author

=if(len(GetCurrentSelections())=0,RGB(0, 0, 255), RGB(192, 192, 192))

tresesco
MVP
MVP

Please realize that this trigger doesn't set the color of the button directly, it only sets the variable value. So try just this:

=if(len(GetCurrentSelections())=0, 0)


Button's color changes based on it's status, 'active' or 'inactive'.

rkpatelqlikview
Creator III
Creator III
Author

sorry Tresesco,

Your QVW is working properly. But when am implementing the same things in application its not working.

Thanks in advance

rkpatelqlikview
Creator III
Creator III
Author

PFA !

tresesco
MVP
MVP

Interesting!

It seems that since your sample app is not having any data (read - field to check for clearance->OnAnySelect), qlik is probably not even triggering the OnAnySelect action assuming that there is nothing to clear. However, if you try with a dummy field loaded or try in the real application (which must be having data), this will work.