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

Hold a listbox selection in a variable after clearing the selection

I have an application that switches between two layouts via a button, and I want to allow the user to make slelections in [Field A] but when they switch to the second layout, I want to record the last selection from [Field A] in a variable but then clear that selection...is this possible?

Thanks,

Paul

1 Solution

Accepted Solutions
tresesco
MVP
MVP

you can use the trigger to clear selection, but for holding the selection you can refer to set analysis. for example: 

sum( {$1} Amt ) - gives you the total Amt for the previous selection.

Thanks.

View solution in original post

3 Replies
tresesco
MVP
MVP

you can use the trigger to clear selection, but for holding the selection you can refer to set analysis. for example: 

sum( {$1} Amt ) - gives you the total Amt for the previous selection.

Thanks.

Not applicable
Author

Thanks for the suggestion; but after I clear the selection, when I switch back to the first screen it shows the values based on there being 'no selections'?

I think ideally, I would need to log the initial selection somewhere (? variable) and trigger a new selection in the field based on that variable when I switch back. 

I have to admit that I'm not convinced that I made an ounce of sense in that statement, but it works in my head???

Not applicable
Author

Thanks Tresesco, after having a rethink it appears that I misunderstood what you had suggested.  I've used that expression in a variable (I had tried to build it into my expression) and now I trigger the 'select in field' to use the variables' value and it works a treat.