Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
BogdanT18
Contributor III
Contributor III

Can you have in Qlik Sense an input box that is displayed conditionally?

Hello,

I am trying to convert a box from QV to QS that has 2 states let's say.

If variable behind has value 1 (top button selected)-> it displays 2 buttons, and if it has value 2 (second button selected) -> it reveals 2 input boxes for other 2 variables used for filtering a time interval. 

Can I do such a thing in QS? Or at least you have any alternatives that I could try? 

Thank you,

Bogdan

Labels (5)
2 Replies
Chanty4u
MVP
MVP

Hi try below 

 

Yes, you can achieve this functionality in Qlik Sense using variables and conditional visibility settings.

 

First, create a variable in the Variable Overview panel of the Qlik Sense interface. Let's call it "State_Variable". You can set the initial value of this variable to 1.

 

Next, create two buttons using the button object in the visualization panel. In the Button Settings panel, set the action of each button to "Set Variable" and choose "State_Variable" as the variable name. For the first button, set the value to 1, and for the second button, set the value to 2.

 

Now, create the input boxes for the two variables that will be used for filtering a time interval. In the Layout tab of the property panel, set the "Show" option to "Conditional" and enter a condition based on the value of the "State_Variable" variable. For example, if you want to show the input boxes only when the second button is selected, you can enter the condition "=$(State_Variable)=2".

 

Finally, add a condition to the visibility setting of the two buttons based on the value of the "State_Variable" variable. For the first button, enter the condition "=$(State_Variable)<>1" to hide it when the first button is already selected. For the second button, enter the condition "=$(State_Variable)<>2" to hide it when the second button is already selected.

 

This should give you the desired functionality of showing and hiding buttons and input boxes based on the value of the "State_Variable" variable

BogdanT18
Contributor III
Contributor III
Author

Hello,

What object is it that you're mentioning for the variable input? Those input boxes. Because the one that I found does not come with a "Show" option. Maybe can you provide some details or a screenshot?

Thank you!