Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
michael_klix
Creator II
Creator II

Can we show list of string values as listbox?

This is the problem:

In my data model I have a field called "tags" that contains per data record a comma-separated list of strings. These tags do allocate the record to evaluation topics and may look like

recordtags

A

customer satisfaction, performance
Bperformance, quality
Cefficiency

What I want is to collect all distinct tags and put them into a list with tickboxes so that the user can easily select all records where this tag appears:

tag
customer satisfaction
performance
efficiency
quality

I know that an easy way could be a fulltext search box on the "tags" field, but it would mean that

a) the user knows the tag looking for

b) you can allways look for one tag at a time only.

But my aim is to give the user an easy overview on all used tags and let him choose the relevant ones in an "or" selection. So if any of the selected tags appears in the tags field of a record, the record will be visible.

E.g. the user selects "Efficiency", record C will come up, If he selects "Efficiency" and "Quality" records C and B will come up.

Any idea how to do this? 

1 Solution

Accepted Solutions
marcus_sommer

Hi Michael,

you could just use an extra table for it created by:

load recordID, subfield(tags, ',') as DistinctTags from Source;

whereby the subfield() without a third parameter worked like a loop.

- Marcus

View solution in original post

7 Replies
Anil_Babu_Samineni

True, deserve lot make sense

If you do simply SubField(tags, ',') as tag will cover all questions. After that you can try filter to check to valid.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
shraddha_g
Partner - Master III
Partner - Master III

try

subfield(tags,',') as tag

marcus_sommer

Hi Michael,

you could just use an extra table for it created by:

load recordID, subfield(tags, ',') as DistinctTags from Source;

whereby the subfield() without a third parameter worked like a loop.

- Marcus

michael_klix
Creator II
Creator II
Author

wow, that was fast... even three at a time 🙂

I will try this and confirm.

michael_klix
Creator II
Creator II
Author

just to understand...why do I need to read as well the record ID?

Annotation:

Is it this what I will get?

recordDistinctTags from Source
Acustomer satisfaction
Aperforrmance
Bperformance
Bquality
Cefficiency

Then I use the field DistinctTags from Source in a listbox and the field record ensures it is linked to the data, thus selecting "Efficiency" will reduce my possible records do "C"?

marcus_sommer

If you perform the subfield within your origin load you will also duplicate all other field-values which might be unwanted - therefore my suggestion within an extra load to create an extra table but for this you will need a key to your other table and therefore I append the suffix ID to your field "record".

- Marcus

michael_klix
Creator II
Creator II
Author

just to give a final Feedback: It works perfectly now.. The new table linked via the key field is great.