Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to pass variable into TableBox as filter

Hi,


I am new to QlikView and got stuck in one scenario. Let’s assume, this is the data I have in my Oracle table. I cannot share the exact data due to security reason.

S_CODE

C_CODE

SI_CODE

TYPE

E_CODE

A

COU_A

A_1

STU

A

A

COU_A

A_1

COU

COU_A

A

COU_A

A_1

SI

A_1

I created 3 Listbox for S_CODE, C_CODE and SI_CODE and displaying the complete set of data in TableBox.

ListBox 1

S_CODE

A

ListBox 2

C_CODE

COU_A

ListBox 3

SI_CODE

A_1

Data in Tablebox:

S_CODE

C_CODE

SI_CODE

TYPE

E_CODE

A

COU_A

A_1

STU

A

A

COU_A

A_1

COU

COU_A

A

COU_A

A_1

SI

A_1

If I Click on ListBox1,ListBox2 or ListBox3, I got all the 3 records in TableBox instead of 1 record. My requirement is:,

If I click on ListBox1 value(A) the data should be display:

S_CODE

C_CODE

SI_CODE

TYPE

E_CODE

A

COU_A

A_1

STU

A

If I click on ListBox2  value(COU_A) the data should be display:

S_CODE

C_CODE

SI_CODE

TYPE

E_CODE

A

COU_A

A_1

STU

COU_A

If I click on ListBox3 value(A_1) the data should be display:

S_CODE

C_CODE

SI_CODE

TYPE

E_CODE

A

COU_A

A_1

STU

A_1

Can you please help me out, how I will get only one record by clicking on ListBox? Is there any way to make a join of ListBox Field selection value with column (E_CODE).

I tried to capture the ListBox Field selection value in variable but don’t know how to pass this variable value into TableBox? Please let me know in-case any additional information required.

Any help regarding this would be really appreciated. Thank You.

Regards:

Amit Jain

1 Solution

Accepted Solutions
adamdavi3s
Master
Master

You could add a document trigger for each of the fields which also triggers the same selection in E_CODE

You could use a chart table instead of a table box which doesn't have many options

Otherwise, why don't you just have a list box for E_CODE?!

View solution in original post

9 Replies
adamdavi3s
Master
Master

You could add a document trigger for each of the fields which also triggers the same selection in E_CODE

You could use a chart table instead of a table box which doesn't have many options

Otherwise, why don't you just have a list box for E_CODE?!

View solution in original post

Not applicable
Author

Hi Adam,

Thank You for the reply !

I can 't use E_CODE as I have to generate the hierarchy in the LISTBOX so the USER gets to know which data is associated in LISTBOX2 and LISTBOX3 by clicking on LISTBOX1.

I will try your approach with document trigger and chart table. As i am new to QlikView, Can you please explain in detail, How i can create a document trigger and how i can pass this value?

Thanks & Regards:

Amit Jain

Anil_Babu_Samineni

No need to create a variable here, Your title mentioned variable, Where do you create the variable.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Not applicable
Author

Hi Anil,

I created the variable in LOAD script and then able to call the same variable in TextBox but not able to pass this variable as a filter in TableBox. I hope you understand the point, Please let me know in-case of any question.

Thanks & Regards:

Amit Jain

Anil_Babu_Samineni

Is there any chance share the applicaiton. What is variable you've created. And somehow, Table box never taken the Variable this situation you might create one more Straight table / Pivot

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
adamdavi3s
Master
Master

I am still confused as to why you can't just use E_CODE as a filter?

adamdavi3s
Master
Master

Hi Amit,

OK I see what you are saying now... just go to settings > document properties > triggers

Then use the field event triggers and add an onselect trigger for each listbox.

I would also add an onChange to make sure you update E_CODE if the user changes the selection.

adamdavi3s
Master
Master

The attached example has a trigger set up on S_CODE

Not applicable
Author

Thank You Adam for your prompt reply. I am able to achieve the scenario from your solution. I created Field Event Triggers on Selection and it works.

Many Thanks !