<?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 QV Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QV-Load-Script/m-p/2078710#M1223944</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have a text file that looks like:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Value Desc1&lt;BR /&gt;1 = 'A'&lt;BR /&gt;2 = 'B'&lt;BR /&gt;3 = 'C'&lt;BR /&gt;4 = 'D'&lt;BR /&gt;;&lt;BR /&gt;Value Desc2&lt;BR /&gt;1 = 'Good'&lt;BR /&gt;2 = 'Bad'&lt;BR /&gt;3 = 'Average'&lt;BR /&gt;;&lt;BR /&gt;Value Desc3&lt;BR /&gt;A0 = 'Green'&lt;BR /&gt;B1 = 'Blue'&lt;BR /&gt;C2 = 'Red'&lt;/P&gt;
&lt;P&gt;I want to load this file into QV and do some scripting in load script so the final output looks like this:&lt;BR /&gt;&lt;BR /&gt;DescType Value ValueDesc&lt;BR /&gt;Desc1 1 'A'&lt;BR /&gt;Desc1 2 'B'&lt;BR /&gt;Desc1 3 'C'&lt;BR /&gt;Desc1 4 'D'&lt;BR /&gt;Desc2 1 'Good'&lt;BR /&gt;Desc2 2 'Bad'&lt;BR /&gt;Desc2 3 'Average'&lt;BR /&gt;Desc3 A0 'Green'&lt;BR /&gt;Desc3 B1 'Blue'&lt;BR /&gt;Desc3 C2 'Red'&lt;BR /&gt;&lt;BR /&gt;Does anyone know how I can do that or maybe point towards a documentation? Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jun 2023 03:03:06 GMT</pubDate>
    <dc:creator>GHasan</dc:creator>
    <dc:date>2023-06-01T03:03:06Z</dc:date>
    <item>
      <title>QV Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/QV-Load-Script/m-p/2078710#M1223944</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have a text file that looks like:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Value Desc1&lt;BR /&gt;1 = 'A'&lt;BR /&gt;2 = 'B'&lt;BR /&gt;3 = 'C'&lt;BR /&gt;4 = 'D'&lt;BR /&gt;;&lt;BR /&gt;Value Desc2&lt;BR /&gt;1 = 'Good'&lt;BR /&gt;2 = 'Bad'&lt;BR /&gt;3 = 'Average'&lt;BR /&gt;;&lt;BR /&gt;Value Desc3&lt;BR /&gt;A0 = 'Green'&lt;BR /&gt;B1 = 'Blue'&lt;BR /&gt;C2 = 'Red'&lt;/P&gt;
&lt;P&gt;I want to load this file into QV and do some scripting in load script so the final output looks like this:&lt;BR /&gt;&lt;BR /&gt;DescType Value ValueDesc&lt;BR /&gt;Desc1 1 'A'&lt;BR /&gt;Desc1 2 'B'&lt;BR /&gt;Desc1 3 'C'&lt;BR /&gt;Desc1 4 'D'&lt;BR /&gt;Desc2 1 'Good'&lt;BR /&gt;Desc2 2 'Bad'&lt;BR /&gt;Desc2 3 'Average'&lt;BR /&gt;Desc3 A0 'Green'&lt;BR /&gt;Desc3 B1 'Blue'&lt;BR /&gt;Desc3 C2 'Red'&lt;BR /&gt;&lt;BR /&gt;Does anyone know how I can do that or maybe point towards a documentation? Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 03:03:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-Load-Script/m-p/2078710#M1223944</guid>
      <dc:creator>GHasan</dc:creator>
      <dc:date>2023-06-01T03:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: QV Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/QV-Load-Script/m-p/2079098#M1223958</link>
      <description>&lt;P&gt;Hi Niclenix,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for your reply. I think I should have mentioned that there are at least 20/30 mini tables within&amp;nbsp; ';' with different values and value descriptions. So the separating the temp tables will be very time consuming. Is there a way to achieve this with a loop statement? Like asking the load script to read this as one column and then whenever it finds the "value" it can&amp;nbsp; put "Desc1" in one column and "Value" in another column and "Value Desc" in 3rd column and then search through the rows and then when reaches the word "value" again then the put 'Desc2" under the last line of "Desc1" and then the "Value" and "Value Desc" in consecutive columns?&lt;BR /&gt;&lt;BR /&gt;Please let me know if it does not make sense or if that is not the right way to move forward. I truly appreciate your help on this. Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 16:28:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-Load-Script/m-p/2079098#M1223958</guid>
      <dc:creator>GHasan</dc:creator>
      <dc:date>2023-06-01T16:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: QV Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/QV-Load-Script/m-p/2084877#M1224046</link>
      <description>&lt;P&gt;I have a found a solution that works. Here is the script:&lt;/P&gt;
&lt;DIV&gt;//Name the text file as 'Sample'&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Temp:&lt;/DIV&gt;
&lt;DIV&gt;LOAD&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @1 As Data&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;From [C:\Desktop\Sample.txt]&lt;/DIV&gt;
&lt;DIV&gt;(txt, codepage is 28591, no labels, delimiter is '^', msq&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;LET currentDescType = '';&lt;/DIV&gt;
&lt;DIV&gt;LET currentDesc = '';&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;FOR i = 0 TO FieldValueCount('Data')&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; LET line = Peek('Data', $(i), 'Temp');&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; IF WildMatch(line, 'Value Desc*') THEN&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; currentDescType = SubField(line, ' ', 2);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ELSEIF WildMatch(line, '* = *')&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LET value = PurgeChar(SubField(line, '=', 1), ' ');&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LET valueDesc = PurgeChar(SubField(line, '=', 2), ' ');&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OutputTable:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOAD&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '$(currentDescType)' AS DescType,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '$(value)' AS Value,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '$(valueDesc)' AS ValueDesc&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTOGENERATE 1;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ENDIF&lt;/DIV&gt;
&lt;DIV&gt;NEXT;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Drop Table Temp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The output looks like this:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GHasan_0-1686928323336.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/110326i699FB786A2E3052B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GHasan_0-1686928323336.png" alt="GHasan_0-1686928323336.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 16 Jun 2023 15:13:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-Load-Script/m-p/2084877#M1224046</guid>
      <dc:creator>GHasan</dc:creator>
      <dc:date>2023-06-16T15:13:11Z</dc:date>
    </item>
  </channel>
</rss>

