<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Separating several values in one field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Separating-several-values-in-one-field/m-p/825144#M667278</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now I have the following follow-up problem:&lt;/P&gt;&lt;P&gt;- In the subroutine, I create 2 fields in the first step&lt;/P&gt;&lt;P&gt;&amp;nbsp; =&amp;gt; Then I derive from that an auxiliary table with just a line_ID and the nr. of records&lt;/P&gt;&lt;P&gt;&amp;nbsp; =&amp;gt; I join that info to the first table I created and&lt;/P&gt;&lt;P&gt;&amp;nbsp; =&amp;gt; delete the auxiliary table again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason, when I run the script (the subroutine is called 4 times), I get a fragmented file, the filename is thus different and the whole thing doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I made a change and left out the whole joining.&lt;/P&gt;&lt;P&gt;=&amp;gt; I just create two tables in the subroutine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; - one which is just appended to every time the subroutine is called&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; - one which has just 4 lines (when the subroutine is called 4 times)&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; The issue now is, in every iteration of the subroutine I want to extract just 1 record into that second table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;=&amp;gt; but I cannot use the FIRST 1 parameter as the first table is appended to, thus I would need to extract the&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; first record from those which I added in the 2nd to 4th iteration, not the first one (which is always the same)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have an idea? I would need the nr_of_lines from the last iteration and so construct the line that I have to extract.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: OK, I've made it. That part works. I'll open a new thread for any new problems that might arise from here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Nov 2014 14:53:54 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2014-11-13T14:53:54Z</dc:date>
    <item>
      <title>Separating several values in one field</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-several-values-in-one-field/m-p/825141#M667275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an Excel_file to load where the employees populating the list now write down so-called track_numbers in one field. However, since they check several tracks in one go (several boxes, that is), they write all the numbers in one line (in one field), separated by a&lt;/P&gt;&lt;P&gt;comma and a BLANK.&lt;/P&gt;&lt;P&gt;The next step will be to fetch from our database the info on who was the last one to post any transaction on that tracking_number(s),&lt;/P&gt;&lt;P&gt;so I need something I can use in a WHERE EXISTS() clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; I suppose that to that end I have to separate all the values in that field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have done that once before in another app, but the issue is that I don't know beforehand the number of values that are stored in&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; that field - there may be just 5 or there may be 20 or whatever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; Is there any way I can parse the list line by line and then make that comma-separated list into a table with as many records, but just one field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 10:33:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-several-values-in-one-field/m-p/825141#M667275</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-11-13T10:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Separating several values in one field</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-several-values-in-one-field/m-p/825142#M667276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's what the subfield function is for. If you use it without the third parameter it will create a record for each item in the list separated by the string passed as second parameter: subfield(MyField, ', ') as MyField_Item&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 10:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-several-values-in-one-field/m-p/825142#M667276</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-11-13T10:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Separating several values in one field</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-several-values-in-one-field/m-p/825143#M667277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is cool. I knew that function, I have used it the last time I did this, but I didn't know it could be used without that parameter. Cool.&lt;/P&gt;&lt;P&gt;So I "just" have to parse the list line by line and use that function on that field where I have that comma-separated list of values?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 10:44:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-several-values-in-one-field/m-p/825143#M667277</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-11-13T10:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Separating several values in one field</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-several-values-in-one-field/m-p/825144#M667278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now I have the following follow-up problem:&lt;/P&gt;&lt;P&gt;- In the subroutine, I create 2 fields in the first step&lt;/P&gt;&lt;P&gt;&amp;nbsp; =&amp;gt; Then I derive from that an auxiliary table with just a line_ID and the nr. of records&lt;/P&gt;&lt;P&gt;&amp;nbsp; =&amp;gt; I join that info to the first table I created and&lt;/P&gt;&lt;P&gt;&amp;nbsp; =&amp;gt; delete the auxiliary table again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason, when I run the script (the subroutine is called 4 times), I get a fragmented file, the filename is thus different and the whole thing doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I made a change and left out the whole joining.&lt;/P&gt;&lt;P&gt;=&amp;gt; I just create two tables in the subroutine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; - one which is just appended to every time the subroutine is called&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; - one which has just 4 lines (when the subroutine is called 4 times)&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; The issue now is, in every iteration of the subroutine I want to extract just 1 record into that second table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;=&amp;gt; but I cannot use the FIRST 1 parameter as the first table is appended to, thus I would need to extract the&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; first record from those which I added in the 2nd to 4th iteration, not the first one (which is always the same)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have an idea? I would need the nr_of_lines from the last iteration and so construct the line that I have to extract.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: OK, I've made it. That part works. I'll open a new thread for any new problems that might arise from here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 14:53:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-several-values-in-one-field/m-p/825144#M667278</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-11-13T14:53:54Z</dc:date>
    </item>
  </channel>
</rss>

