Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
New Contributor II

Clear and select field on variable change trigger

I have a simple desire to make filter selections when I change a variable in an input box. The problem is, when I use a variable trigger to clear all current selections then "Select in Field" all the the 'Yes' field values, the current selections do not clear and the field selections do not reflect what I have chosen in the the input box. 

Here is an example of the behavior I want:

1. I select the field "Fruit?"

2. All data that are fruit are displayed

3. I change my selected field from "Fruit?" to "Green?"

4. The field selection from "Fruit?" is cleared from the current selections

5. All data that are green are displayed

I appreciate any help on this. I have been trying different work-arounds, but nothing seems to be able to update the variable before the trigger happens. Capture1.PNG

Thanks!

(By the way, this seems like I could simply just keep the list boxes, but because of limited screen real estate, I need to consolidate down to a drop down.)

+I'm using version 12

1 Solution

Accepted Solutions
Highlighted

Re: Clear and select field on variable change trigger

You don't you simplify your data model to this

Table:
CrossTable (Produce, Flag)
LOAD * INLINE [
    Item, Fruit?, Green?, Round?, Peel?
    Apple, Yes, No, Yes, No
    Pear, Yes, No, No, No
    Orange, Yes, No, Yes, Yes
    Banana, Yes, No, No, Yes
    Avocado, Yes, Yes, No, No
    Carrot, No, No, No, No
    Broccoli, No, Yes, No, No
];

FinalTable:
LOAD Item,
	 Produce
Resident Table
Where Flag = 'Yes';

DROP Table Table;

and then add a multibox for the new field called Produce to do this?

View solution in original post

1 Reply
Highlighted

Re: Clear and select field on variable change trigger

You don't you simplify your data model to this

Table:
CrossTable (Produce, Flag)
LOAD * INLINE [
    Item, Fruit?, Green?, Round?, Peel?
    Apple, Yes, No, Yes, No
    Pear, Yes, No, No, No
    Orange, Yes, No, Yes, Yes
    Banana, Yes, No, No, Yes
    Avocado, Yes, Yes, No, No
    Carrot, No, No, No, No
    Broccoli, No, Yes, No, No
];

FinalTable:
LOAD Item,
	 Produce
Resident Table
Where Flag = 'Yes';

DROP Table Table;

and then add a multibox for the new field called Produce to do this?

View solution in original post