Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional Show/Hide and Clear All

Hi guys,

I have some charts that are conditionally hidden and shown depending on some criteria.

I would like to make sure that before the charts are shown or hidden, that the clear all event happens.

For example if Chart 1,2 and 3 are shown, I want the Clear All action to happen as Charts 4,5 and 6 become visible and Charts 1,2 and 3 become hidden.

I have had a look and I am struggling to get this working as I can't set a condition for the Clear All trigger.

I would appreciate any suggestions to get this working.

Many thanks

8 Replies
Not applicable
Author

You can add one more action at top , Action > Selection > Clear All.

If you attache the sample app, we can apply the same.


Not applicable
Author

attaching a smaple app for you

Not applicable
Author

Hi Nagaraj,

Thank you for your reply.

My conditional show/hide is triggered automatically at specific points during the day and the users do not want a button to show or hide a chart.

Your solution is very useful, but it does not work in my specific scenario.

Many thanks

Not applicable
Author

Hi,

For conditional hiding or showing you may be using same variable, on change of that variable value add a trigger for clear All

Regards,

Abhishek Neti

fkeuroglian
Partner - Master
Partner - Master

Hi. you can do it using variables

i give an example

Try this,

      Variable ->vhide

Value:

     =If(vhide = 0, 1, 0)

In chart, use vhide variable  in Layut-conditional  - show = vhide


with this variable you can show/hide all the object


good luck


Fernando

rsdhavle
Creator II
Creator II


You can use any other object as a refence to put conditions on a chart. Just pass that object id in Layout conditional expression.

Example:

Lets say if you want to hide one chart when you click on one particular text box just pass object ID of that text box into your chart as a conditional expression

Not applicable
Author

I thought about that and I have tried using the on change variable event trigger but it doesn't work for me.

My variable is defined in the variable overview in the Front End and not in the script because I need to show and hide objects based on dynamic time intervals.

It is of the form

Variable = if statement that evaluates when to show or hide the objects

Regards

Not applicable
Author