Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Automatically Select Last Remaining Value

Hi Experts,

Is there an option in QlikView 11.2 that it will automatically select the last remaining value in a list box?

Based on the selections my dash shows graph and content of those graphs. Basically when the user hasn't selected anything it will show that a selection has to be made. When he/she selects an Site the dash will show a graph containing info on that Site. Within the Site there are Clients, So when a Site is selected it will show the Site and the Clients in that Site. Then Sites have Departments, if I select a Client it shows me the Departments.

Now comes the tricky part...   If there is only one Department underneath a Client, than there is only one possible next selection. Because of that my dash will show that Department, but it will not show its info because the department hasn't physically been selected. This is why I want my app to automatically select that remaining option, otherwise the user will get to see an empty chart.

Thnx,

Jasper

2 Replies
luciancotea
Specialist
Specialist

Use ONLY() to check for a single value. You don't have to wait for a selection to display your chart, if it makes sense.

If you really want this functionality, add a trigger on the Client OnSelect event, check if you have a single value on Department and select it.

ravishankarqv
Contributor III
Contributor III

Hi Jasper,

Using Variable & Triggers, your expected auto selection is doable.

Step 1 : create a variable vSelectedClient = MaxString(<CLIENTFIELD>)

Step 2 : create On Change trigger for vSelectedClient

Step 3 : on Actions for trigger, use SelectPossible and below expression as field

               =If(GetPossibleCount(<DEPARTMENT FIELD>) = 1, '<DEPARTMENT FIELD NAME>',' ')

HTH

Ravi