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.

omnomnom
New Contributor

Unconcatenate cell value

Hi everyone!

i have  field like this

<data><field id="1084"/><field id="1085">109</field><field id="1087">0</field><field id="1088">1</field></data>

how extract it to

IDVaule
1184null
11851109
11870
11881

?

Tags (1)
1 Solution

Accepted Solutions

Re: Unconcatenate cell value

Hi,

one possible solution:

QlikCommunity_Thread_133828_Pic1.JPG.jpg

tabInput:

LOAD *,

     RecNo() as RecNo

INLINE [

    field

    '<data><field id="1084"/><field id="1085">109</field><field id="1087">0</field><field id="1088">1</field></data>'

];

tabOutput:

LOAD RecNo,

     SubField(SubField, '"', 1) as ID,

     TextBetween(SubField, '>', '<', 1) as Value

Where SubField <> '<data>';

LOAD RecNo,

     SubField(field, '<field id="') as SubField

Resident tabInput;

hope this helps

regards

Marco

1 Reply

Re: Unconcatenate cell value

Hi,

one possible solution:

QlikCommunity_Thread_133828_Pic1.JPG.jpg

tabInput:

LOAD *,

     RecNo() as RecNo

INLINE [

    field

    '<data><field id="1084"/><field id="1085">109</field><field id="1087">0</field><field id="1088">1</field></data>'

];

tabOutput:

LOAD RecNo,

     SubField(SubField, '"', 1) as ID,

     TextBetween(SubField, '>', '<', 1) as Value

Where SubField <> '<data>';

LOAD RecNo,

     SubField(field, '<field id="') as SubField

Resident tabInput;

hope this helps

regards

Marco