Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
chaper
Creator III
Creator III

How to find string value from Space separated String field

I have field with space separated multiple strings.I want to find a particular string value from that field.The position of that particular string value can be anywhere and it changes.How to find the particlar string?

thanks in advance

23 Replies
swuehl
MVP
MVP

I've also used subfield(), so my code will also produce a records for each subitem. I believe that's what you need to do if you want a field with your groups linked to your items, so selecting a group value will show you all items.

You can use a link table for the 1:n relation if you want to avoid duplicating your original records with potentially more fields.

Any other solution I can think would imply to use some kind of expression to filter your records, where you choose the value you want to filter from a e.g. variable input box drop down list (or an data island field) and then use the variable within an expression with somekind of match / wildmatch function.

But I personally would favor the linked field in the data model, creating a  group field using subfield() function.

sunny_talwar

May be using a trigger.

Script:

Table:

LOAD * Inline [

SNo, Source

1, DB2 SQL Oracle

2, SQL DB2 Excel

3, DB2 Oracle SQL Excel

4, Oracle Access

];

ListBox:

LOAD * Inline [

Type

DB2

SQL

Oracle

Excel

Access

];


Capture.PNG


and then use trigger on Type field to select in field: Source

Capture.PNG

Attaching the qvw for reference.

HTH

Best,

Sunny


rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think one to many is what you want. See attached example qvw.

data:

LOAD * Inline [

SNo, Source

1, DB2 SQL Oracle

2, SQL DB2 Excel

3, DB2 Oracle SQL Excel

4, Oracle Access

];

Types:

LOAD SNo,

  subfield(Source,' ') as Type

Resident data;

2015-06-12_10-57-11.jpg

-Rob

http://masterssummit.com

http://robwunderlich.com

chaper
Creator III
Creator III
Author

Thanks Rob.All the while I was doing Subfield(Source) directly while loading the table.I got it right by doing Subfield (source) on resident .