Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

oliver_zorn
Not applicable

How can I subdivide a string like "level1 | level2 | level3" into 3 Datafields

Hi! I try to analyse our data from our ticketsystem. There is a field called section where users can choose the concerning topic of the ticket via a treeview. The database shows the 3 levels of this treeview as one string like 'level1 | level2 | level3'. How can I subdivide this string via script into three fields for each level? Thx!

Tags (2)
1 Solution

Accepted Solutions
Not applicable

How can I subdivide a string like "level1 | level2 | level3" into 3 Datafields

Hi,

You can Subfiled function.

eg:

subfield(S, ';' ,2)

returns 'cde' if S is 'abc;cde;efg'

3 Replies
Not applicable

How can I subdivide a string like "level1 | level2 | level3" into 3 Datafields

Hi,

You can Subfiled function.

eg:

subfield(S, ';' ,2)

returns 'cde' if S is 'abc;cde;efg'

Not applicable

How can I subdivide a string like "level1 | level2 | level3" into 3 Datafields

Try ths in your script.

Temp:

Load * Inline [

LinkValue,

level1 | level2 | level3

];

LinkSplit:

Load LinkValue,subfield(LinkValue,'|') as LinkSplit Resident Temp;

Drop table Temp;

Regards,

Kiran.

oliver_zorn
Not applicable

How can I subdivide a string like "level1 | level2 | level3" into 3 Datafields

Thanks! Very helpful!