Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
albe
Contributor
Contributor

Dynamic List Box

Hello,

I would like to create list boxes by reading an external parameter file containing the name of the fields and a flag to choose if they should be displayed in a list box.

Do you have an idea to do this ?

I tried creating a table that has the name of the fields to be displayed in list boxes, but I don't know how to choose the list box field using an expression.

Thank you for your help.

1 Reply
MarcoWedel

Hi,

one possible solution to this might be:

 

 

MarcoWedel_0-1641919885212.png

 

MarcoWedel_1-1641919907667.png

=$(=Only({$<ShowFieldID={1}>} NameOfField))

 

MarcoWedel_2-1641919934329.png

=$(=Only({$<ShowFieldID={1}>} ShowField))

 

 

Using a table containing the field names and show flags:

tabShowFields:
LOAD RecNo() as ShowFieldID, *
INLINE [
    NameOfField, ShowField
    Field1, 1
    Field2, 0
    Field3, 1
    Field4, 1
    Field5, 0
    Field6, 1
    Field7, 0
    Field8, 1
];


tabData:
LOAD Ceil(Rand()*20) as Field1,
     Ceil(Rand()*20) as Field2,
     Ceil(Rand()*20) as Field3,
     Ceil(Rand()*20) as Field4,
     Ceil(Rand()*20) as Field5,
     Ceil(Rand()*20) as Field6,
     Ceil(Rand()*20) as Field7,
     Ceil(Rand()*20) as Field8
AutoGenerate 30;

 

hope this helps

Marco