Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Specialist
Specialist

Re: Automatically Select Last Remaining Value

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.

Highlighted
Contributor III
Contributor III

Re: Automatically Select Last Remaining Value

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