Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Specialist
Specialist

Extract new fields from a string

Hi experts

I need to extract 3 new columns with their values from a string:

Project.ID='123',BOM='AB',Product.ID='55'

What is the best practise, thank you for your help!

Tom

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Assume your sample:
Project.ID='123',BOM='AB',Product.ID='55'

is in the field str:

TextBetween(str, 'Project.ID=''', '''') as ProjectID,
TextBetween(str, 'BOM=''', '''') as BOM,
// etc

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Assume your sample:
Project.ID='123',BOM='AB',Product.ID='55'

is in the field str:

TextBetween(str, 'Project.ID=''', '''') as ProjectID,
TextBetween(str, 'BOM=''', '''') as BOM,
// etc

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

TomBond77
Specialist
Specialist
Author

Thanks @rwunderlich 

I have this string: 

ALTERNATIVE_NO=*^BOM_TYPE_DB=M^CONTRACT=LKP^GUIDELINE_NO=1^OPERATION_ID=4^PART_NO=3600009-620^ROUTING_REVISION=1^

and have this code:

TextBetween(KEY_REF, 'PART_NO=', null()) as Part_NO,

 

As result I am getting this value: 3600009-620^ROUTING_REVISION=1^

But I only need 3600009-620.

How can I get the right value in my code above?

Thank you, Tom

BrunPierre
Partner - Master
Partner - Master

As below.

TextBetween(KEY_REF, 'PART_NO=', '^') as Part_NO