Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Flag cannot be cleared from selection

Hi,

I have a listbox that has an expression like below

if(%spendFlag = 1, Region)

The listbox is only showing regions that has a %spendFlag = 1. The problem is that if I select any region from the listbox, I cannot select any other regions in other sheets. one reason is that If don't use the hide prefix, I can see in the selection box that along with regions, I also see the %spendFlag=1 in the selection box. If I use a trigger to clear the field %spendFlag upon leaving the sheet, it cannot clear %spendFlag and without clearing this field, I cannot select other regions on other sheets. I can only select the regions where %spendFlag = 1

Any solution for this?

14 Replies
MK_QSL
MVP
MVP

Can you provide sample file for this?

senpradip007
Specialist III
Specialist III

Use a trigger on "Leave Sheet", clear the field of Region and %spendFlag.

sasikanth
Master
Master

HI,

Try this expression

=Aggr(Only({<%spendFlag={'1}>}Region)Region)

=Aggr(Only({<%spendFlag={'1'}>}Region),Region)

Also use the trigger Clear All on leave sheet and reset the clear state (Selection-->Reset Clear state ) if enabled

senpradip007
Specialist III
Specialist III

Sunny,

Expression may be like, Aggr(Only({<%spendFlag={1}>}Region)Region)

tresesco
MVP
MVP

One more correction (comma) - Aggr(Only({<%spendFlag={1}>}Region) , Region)

Though I am not sure, if this helps the original case of query. May be a sample qvw could help us help better.

Not applicable
Author

Here is an example file. In the second sheet for example, I cannot select stockholm.

Regards

sasikanth
Master
Master

HI,

PFA  Added trigger

Not applicable
Author

Thanks for the solution. I cannot use the clear all trigger. I only want to clear the flag. If you use the clear field trigger, you can notice that it does not work

Regards

sasikanth
Master
Master

You are making selections on City field so you should clear the city field in order to see no selections in next sheet

i dont think there is a meaning if you clear %Flag.

if i missed please explain what you are trying to achieve