Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
MaxSeagull
Contributor II
Contributor II

Workaround for not having conditional hide/show in QlikSense for Listboxes

Hi,

i want to create an app with several listboxes for the user to easily assemble their analysis:

The first listbox ('mode') is set by a bookmark and contains lets say the values Departure and Arrival.

The next few filter are for selecting the timespan you want to have a look at. But these depend on the selection made in 'mode'. E.g. if Departure is selected the second listbox should contain the field 'Departure_Date_Year', if 'Arrival is selected it should contain 'Arrival_Date_Year'.

In QlikView there was the option to have a condition under the layout tab. So you could have 2 listboxes at the same position and hide them based on the selection in the first listbox.

In QlikSense this option is missing, so this is what i tried using in the dimension if the second listbox:

=if(GetFieldSelection(mode)='Departure', Departure_Date_Year,

if(GetFieldSelection(mode)='Arrival', Arrival_Date_Year)

But when I make a selection in this second listbox and the mode was for example on 'Departure' it also makes a selection in 'Arrival_Date_Year'.

Can someone help me with this? Or give me another workaround for not having the option to hide listboxes via conditions in QlikSense?

Thanks!

 

 

 

Labels (1)
3 Replies
marcus_sommer

Maybe you could use an (adhoc) variable, like:

[$(=if(GetFieldSelection(mode)='Departure', 'Departure_Date_Year', 'Arrival_Date_Year'))]

- Marcus

MaxSeagull
Contributor II
Contributor II
Author

Thank for your reply Marcus.

When I apply your proposal to my listbox in the Dimension, I only get an error...I never worked with an adhoc variable, could you further elaborate?

 

marcus_sommer

It means that $(= ...) is evaluated before everything else and replaced with the calculated content - as if you had written it manually. I'm not sure if Sense supports this kind of $-sign expansion so just apply it or something simpler like: $(=num(today())) within a text-box to see if it's resolved. If it's calculated it means that there is any small mistake maybe with the quotes, brackets or the spelling. If not you couldn't apply this method directly and you may need to apply the calculation to a named variable which you then calls in the list-box.

- Marcus