Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
saimahasan
Partner - Creator III
Partner - Creator III

Clear All on selection of specific field value

Hi,

I have a listbox. Upon selection of a specific value in that listbox, i need to clear all. Also i want to show a chart basis that specific value.

Please help.

12 Replies
MK_QSL
MVP
MVP

Provide sample data along with your requirements.

Miguel_Angel_Baeyens

You will need to create a trigger in the document so when you select on that field, something happens (in this case, an Action type Selection > Clear All).

Open the QVW file using QlikView Desktop, then go to Settings > Document > Trigger > Field Event Triggers > select the field > On Change > Add > Selection > Clear All

As for the chart, I'm not sure which the requirement is.

Chanty4u
MVP
MVP

Hi,

go to --document properties--triggers

select your field in   Field evnt triggers and select   --OnSelect--- add action select in field --> give your search string

and add  other action   on On change  trigger for clearall trigger

saimahasan
Partner - Creator III
Partner - Creator III
Author

Chart is not priority so you can leave it.

My basic requirement is when i click on a specific value in listbox my all previous selections should get cleared off.

Miguel_Angel_Baeyens

Then the steps above will work. You can also try

1.- Create a variable that controls which value is selected, with an expression similar to "=If(Field = 'Value', 1, 0)"

2.- Create the trigger based on that variable

Open the QVW file using QlikView Desktop, then go to Settings > Document > Trigger > Variable Event Triggers > select the variable > OnChange > Add > Selection > Clear All


You can use a Bookmark action instead and keep the user selections.


However, I don't quite understand the logic: why do you want to clear all when a certain value is selected? Shouldn't that value be somewhere else and avoid this complexity? I mean, if all is cleared when I select 2016, shouldn't 2016 better not be available?

saimahasan
Partner - Creator III
Partner - Creator III
Author

PFA my sample file.

SO, basically on clicking on 2603 in Field1, i want all the selections in Type1, Type2 and Type3 to get cleared.

saimahasan
Partner - Creator III
Partner - Creator III
Author

Basically i have multiple charts shown basis on different values in the listbox. So upon selection of one specific value i want to show one chart and also wants to clear all previous selections. Its kinda isolated chart wherein all previous selections should not have an impact on that chart. Rather user can select new values as per his choice.

Miguel_Angel_Baeyens

Then use the "1" set in the set analysis for that particular chart, so it will ignore any selections done by the user, for example:

Sum({1} Sales)

Will always show the total sum of values in field Sales even if the user has done any selections. The other charts will change according to the selections.

EDIT: For the sake of the example, if user selects Year = 2016, it will still show all years in that specific chart, where the "1" is used in the expression

saimahasan
Partner - Creator III
Partner - Creator III
Author

Also i want to clear all selections only upon one value in the field for eg if listbox is having 3 values "ABC", "DEF", "GHI". So i want to clear selections only upon selecting GHI