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: 
settu_periasamy
Master III
Master III

Display Listbox based on $Field Selection Dynamically

Hi Guys,

I need to display the listbox based on the $Field selection. The listbox should display with the order(like $FieldNo). see the below screen shot for reference.

QV_Help1.JPG

ttached the sample file.

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Use this expression for the list boxes

=$(=SubField(GetFieldSelections($Field, '|'), '|', 1))

=$(=SubField(GetFieldSelections($Field, '|'), '|', 2))

=$(=SubField(GetFieldSelections($Field, '|'), '|', 3))

Hope this helps you.

Regards,

Jagan.

View solution in original post

12 Replies
Anonymous
Not applicable

Try adding a condition in the layout tab using GetFieldSelections().

naveen_y19
Partner - Contributor II
Partner - Contributor II

Right Click on properties for each List box, in the properties page goto Layout Tab --> Select Show Conditional and put the following condition in it "=if($Field='Ctype', True(), False())"

do the same thing for

From --> =if($Field='From ', True(), False())

Product --> =if($Field='Product ', True(), False())

settu_periasamy
Master III
Master III
Author

Hi Naveen,

Thanks. But i have more than 300 Fields. The user will select the Field, based on their need.

is any other way to do this?

tresesco
MVP
MVP

Dsiplay condition, like:

Max(If($Field='Ctype',1,0))=1

PFA

settu_periasamy
Master III
Master III
Author

Thanks Tressco. I have more than 300 fields. My attached was just for sample.

need to display the Listbox, anywhere in the $Field Selection.

tresesco
MVP
MVP

So you don't want to write this condition for all these 300 list boxes, right? I am afraid, that effort might not be bypassed.

settu_periasamy
Master III
Master III
Author

I can use the expression =$(=$Field) in the Listbox Expression. But this is working for only one selection.

If i select more than one Field, the listbox should display nearby Previous Listbox. find the attached please

jagan
Luminary Alumni
Luminary Alumni

Hi,

Use this expression for the list boxes

=$(=SubField(GetFieldSelections($Field, '|'), '|', 1))

=$(=SubField(GetFieldSelections($Field, '|'), '|', 2))

=$(=SubField(GetFieldSelections($Field, '|'), '|', 3))

Hope this helps you.

Regards,

Jagan.

tresesco
MVP
MVP

The way you trying is fine. And that would only work for one selection, because you are defining expression of one listbox, so based on your selection you can get a different field value in a list box but not many list boxes.