Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
musketeers
Creator
Creator

Select in field trigger search string help

Hi,

I have a field Prod_Type in my database and it has two values:

1. New Product

2. Old Product.

I have to display sales value for both products or any one which is selected. So I have created a InLine table with three values:

ALL

NEW

OLD

I am displaying these three values in List Box in qlikview and user can select any one of the three values and the functionality is as below:

1. When user selects NEW or OLD from list box, I have written Document Trigger to select New Product or Old Product from Prod_Type field.

2. When user select ALL from list box, I am clearing any selection from Prod_Type field.

This is working fine till now.

Now there is a scenario:

Now in database table in Prod_Type field we do not have New Product data. So we have only Old Product data in database table.

So when in Qlikview dashboard user is selecting NEW from list box, Qlikview is displaying data for Old Product because it has not found New Product.

Is there any solution for this issue.

Thanks for your help.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Create a link table that links your Prod_Type to your list box values:

LOAD * INLINE [

Prod_Type, Selection_ListBox

New Product,ALL

Old Product,ALL

New Product, NEW

Old Product, OLD

];

Now you don't need any triggers and selecting NEW should result in zero for Sum(Sales).

View solution in original post

5 Replies
Miguel_Angel_Baeyens

Perhaps some data would help to understand the issue. If there are only two possible values for Prod_Type, why use a trigger in the first place? The user can already select NEW or OLD using that field and select both (so both values will be in green) or none (both values will be in white) to see both NEW and OLD altogether.

musketeers
Creator
Creator
Author

Hi, Thanks for your reply. Actually your thoughts are correct. But since Users need ALL keyword to select every thing, thats why I have created the inline table and I am using triggers to connect inline table selection with the database field.

Till now this was working fine, but now they have changed the data and now it does not contain value for New Product, so now it is not working.

But still users want to see these three values from inline table and when they will select NEW, dashboard should display 0 (Zero) for sales sum because there is no New Product now in database.

Thanks

effinty2112
Master
Master

Hi Rajneesh,

Instead of a table with fields [New Product],[Old Product] why not have a table of products with fields Product and Status:

Product     Status

1000            New

1001          New

.

.

.

ABC1          Old

ABC2          Old

.

.

Selecting the status as old or new or not having a selection in this field should work for you. If you want to keep the connection between old and new you could add a third column, Alternative Code.

Cheers

Andrew

swuehl
MVP
MVP

Create a link table that links your Prod_Type to your list box values:

LOAD * INLINE [

Prod_Type, Selection_ListBox

New Product,ALL

Old Product,ALL

New Product, NEW

Old Product, OLD

];

Now you don't need any triggers and selecting NEW should result in zero for Sum(Sales).

musketeers
Creator
Creator
Author

Hi Stefan,

Thanks for your help. It is working very fine. Thanks again.