Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator II
Creator II

List box selection conditionaly

i have the list box1 it contain product, salesman and area this list box content are loaded by In-line script.

if i select the product in list box1 i want to show the list box of product (it is another list box)

if i select the salesman i want to show the list box of salesman  (it is another list box)...

How can i achieve this help me

Thanks in advance

1 Solution

Accepted Solutions
sujeetsingh
Master III
Master III

Stephen,

You have to follow the reference manual for triggers.

Actually how it works is we set action for a field. Let there be Inline Field as Field1. Here Field1 has value Product,SalesMan and Area. Now you also have separate fields as

  Product = Values of product can be Shirt,Belt etc

  SalesMan = Ram,Jhon,Rahim etc

  Area = Delhi,Bombay,City road etc

You have called these fields in separate list boxes. Now you have ListBox with Field1 which has 3 values Product,SalesMan and Area. Now in triggers you have to write action. use External action"Set Variable'

Create a variable vListBox (you should know how to create).

In actions value expression write:

if(getfieldselection(Field1)='Product',1,if(getfieldselection(Field1)='Area',2,if(getfieldselection(Field1)='SalesMan',3)))

Now on each List boxe for Product  write Show conditional  as

  if(vListBox=1,1,0)

Now on each List boxe for SalesMan write Show conditional  as

   if(vListBox=3,1,0)

Now on each List boxe for Area write Show conditional  as

  if(vListBox=2,1,0)

View solution in original post

14 Replies
sujeetsingh
Master III
Master III

Just use trigger on Fileds.

-Go to >> Document Properties

- Triggers Tab
- Go for the required field in Field event Trigger

Then you can write the action on On Select to activate each List boxes.

vardhancse
Specialist III
Specialist III

So, you want to see related data for one selection in one list box in another list box, then we need to join the tables as per our requirement.

Once see the data model may be tables may not be joined if at all 3 fields were from 3 different tables

stephenedberkg
Creator II
Creator II
Author

can you explain about detaily

gautik92
Specialist III
Specialist III

try to use trigger on select to show list boxes

ChennaiahNallani
Creator III
Creator III

Go to Document Proprieties select Triggers and select your field name (witch you want select field) in field event triggers, click on "On Select" Button.

Select Add->layout->Active Object and Give Object ID(witch you show list box ID)

maxgro
MVP
MVP

if I understand, see attachement

stephenedberkg
Creator II
Creator II
Author

not one object based on selection i want to show the list box

stephenedberkg
Creator II
Creator II
Author

i am using trial version can you share the procedure

sujeetsingh
Master III
Master III

Stephen,

You have to follow the reference manual for triggers.

Actually how it works is we set action for a field. Let there be Inline Field as Field1. Here Field1 has value Product,SalesMan and Area. Now you also have separate fields as

  Product = Values of product can be Shirt,Belt etc

  SalesMan = Ram,Jhon,Rahim etc

  Area = Delhi,Bombay,City road etc

You have called these fields in separate list boxes. Now you have ListBox with Field1 which has 3 values Product,SalesMan and Area. Now in triggers you have to write action. use External action"Set Variable'

Create a variable vListBox (you should know how to create).

In actions value expression write:

if(getfieldselection(Field1)='Product',1,if(getfieldselection(Field1)='Area',2,if(getfieldselection(Field1)='SalesMan',3)))

Now on each List boxe for Product  write Show conditional  as

  if(vListBox=1,1,0)

Now on each List boxe for SalesMan write Show conditional  as

   if(vListBox=3,1,0)

Now on each List boxe for Area write Show conditional  as

  if(vListBox=2,1,0)