Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Activating OnSelect trigger from a list box


Hi.

I am making an application for a customer in QV, and I have a small problem.

I have a list box with the option 'Always One Value Selected' activated.

I also have a field trigger with some actions, that I want to be made, whenever I select a value from the list.

My problem is, that the field trigger is not activated, when I select the same value again in the list box. Only if I select another value. Is there a way around this?

I thought of a fake value in the data, that could serve as a default value, but not shown in the list box, but I think that is a crappy solution. Any ideas?

Have a nice day.

Kind regards

H.P. Hansen

Denmark

8 Replies
Not applicable
Author

Have you tried applying the triggers to "On Select" option as well as the "On Change" option?

Not applicable
Author

Could you elaborate on what field triggers are you working on

tresesco
MVP
MVP

Possibly your trigger is set on 'On Change'. Change it to 'On Select'.

Not applicable
Author

I have tried to set it on both OnChange and on OnSelect. That doesn't make any difference. I am not sure that QV sees it as a selection or change, if you pick the same value from the list box (or the straight table, or whereever you click the value).

tresesco
MVP
MVP

Could you post a sample that demonstrates the issue?

Not applicable
Author

I have attached an example with 2 fields: Branch and Name. The field Branch have activated the flag 'Always One Selected Value'.

I have made a trigger OnSelect on the field Branch, and the purpose of the trigger is to switch to sheet 2.

Try to select a branch on the list. If you select the one already selected, nothing happens. If you select another, you swap to sheet 2.

tresesco
MVP
MVP

This behavior can be explained like this: when a value is selected in a listbox, if you click on it again, qv interprets it as 'user wants it to get deselected'. Once you have 'Always One Selected Value' enabled, qv tries to deselect in vain. So, qv is not getting any action 'On Select' or 'On Change' to be true. Hence the trigger is not fired.

Not applicable
Author

That is exactly the problem.

Can you think of any way around this, without having to code some crappy things, with fake values and such...?