Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to use listbox to select delimeted values in table

A have a data base with a column with  | seperated values.

is it possible to create a listbox that searches for all seperate values

example

database column

id     country

1      england|holland|sweden

2     China|Rusia|Vietnam

3     Greece|germany|england

I want a listbox that will contain all countries and will display id 1 and 3 if england is selected.

I have tried = SubField(country,'|') in the expression in t\he general tab in List Box but get strange results.

Anyone??

@ !

7 Replies
sunny_talwar

Why not do it in the script by creating a linktable

Table:

LOAD id,

          country as CountryConcatenated

FROM Source;

LinkTable:

LOAD Distinct CountryConcatenated,

          SubField(CountryConcatenated, '|') as Country

Resident Table;

Now you can use Country as your list box.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

In the current listbox, use a wildcard search for *england*, press enter and you'll select all concatenated strings that carry the text england somewhere. The standard QlikView search can do some pretty amazing things.

Not applicable
Author

Thank you for the solution but this way my data gets very big because all variables will be repeated for each country.

that is why I concatenated the countrynames.  I am trying to find a way to search within this field.

Not applicable
Author

Thank you Peter

I want to give the users a listbox with the names of the possible counties where they can pick a county.,

sunny_talwar

This transformation will be part of a separate table which will keep the size of your fact table intact. It is only going to be impacting a link table.

Not applicable
Author

Well you create the CountryConcatenated which will be linked to the table1. It creates a new record if there is more then 1 country.

table1


1  england|holland|sweden

2 england|holland|sweden

3 england|holland|sweden

will become

1  england|holland|sweden england

1  england|holland|sweden     holland

1  england|holland|sweden  sweden

2 england|holland|sweden england

2england|holland|sweden holland

etc

sunny_talwar

I guess it does, but the size of fact table is still the same. This increase in size is a supplemental table which should not negatively effect performance. Not sure if there is another way to do this. May be someone else have better ideas