<?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: Dynamic Column Names in Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096830#M364293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solved it with your suggestions of GENERIC Load &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vColumnNo = NoOfFields('InputTable')-1;&lt;/P&gt;&lt;P&gt;FOR j = 1 to $(vColumnNo)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flags:&lt;/P&gt;&lt;P&gt;Generic LOAD&lt;/P&gt;&lt;P&gt;id,&lt;/P&gt;&lt;P&gt;identifier,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;//Attribute &amp;amp; Value &lt;/P&gt;&lt;P&gt;[$(j)], slug$(j)&lt;/P&gt;&lt;P&gt;Resident FactTable;&lt;/P&gt;&lt;P&gt;NEXT j&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now i have one last problem.&lt;/P&gt;&lt;P&gt;When I´m doing the Gerneric Load in the FOR Loop, I get the error&amp;nbsp; &lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif'; color: #002060;"&gt;“Blank field name not allowed”, &lt;/SPAN&gt;if the field "value" contains blank values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I avoid this error in LOAD?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jan 2016 11:04:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-01-18T11:04:44Z</dc:date>
    <item>
      <title>Dynamic Column Names in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096826#M364289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi struggling with following problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let's say i have Data like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1-slug1-slug2&lt;/P&gt;&lt;P&gt;2-slug1-slug3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1-gender-age&lt;/P&gt;&lt;P&gt;2-country-city&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1-male-20&lt;/P&gt;&lt;P&gt;2-ger-muc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, first Step was to split the string into separate Columns.&lt;/P&gt;&lt;P&gt;I did this with SubString()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Result is Table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Identifier&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;slug1&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;slug2&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;male&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ger&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;muc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am trying to achieve now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the Identifier the slugs have a different Meaning with different Data.&lt;/P&gt;&lt;P&gt;So what I´m trying to achieve now, is to Create New Columns and name them based on the Identifier&lt;/P&gt;&lt;P&gt;For the sample data it should look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Identifier&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;gender&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;age&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;country&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;city&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;male&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ger&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;muc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for any help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 14:20:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096826#M364289</guid>
      <dc:creator />
      <dc:date>2016-01-15T14:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Column Names in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096827#M364290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think your need could be satisfied with the GENERIC LOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at this document by Henric Cronström: &lt;A href="https://community.qlik.com/qlik-blogpost/3629"&gt;The Generic Load&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you could also read Rob Wunderlich's blog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2010/05/use-cases-for-generic-load/" title="http://qlikviewcookbook.com/2010/05/use-cases-for-generic-load/"&gt;Use cases for Generic Load | Qlikview Cookbook&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jan 2016 00:11:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096827#M364290</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2016-01-16T00:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Column Names in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096828#M364291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use GENERIC function or For Loop to create Dynamic Field names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have 3 input tables ? I don't understand which tables are source tables and what is the final desired out put. Can you please post the sample source data with expected output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jan 2016 04:56:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096828#M364291</guid>
      <dc:creator />
      <dc:date>2016-01-16T04:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Column Names in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096829#M364292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my raw data is looking like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACT TABLE:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;id&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;slug&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1-male-35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2-ger-muc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have a Table with the meaning of the several parameters in the slug&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INPUT TABLE:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;identifier&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;slug1&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;slug2&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;gender&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;age&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;country&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;city&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;depending on the identifier in the slug the parameters have different meanings.&lt;/P&gt;&lt;P&gt;e.g:&lt;/P&gt;&lt;P&gt;if identifier = 1: the middle part of the slug is gender&lt;/P&gt;&lt;P&gt;if identifier = 2: the middle part of the slug is country&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The input table should be extendable with new identifiers and meanings of the different parameters in the slug. The data is an excel file, where I can add new rows with new identifers etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the next step i generated new columns with splitting the slug into the separate parts. I used the function "substring"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now i have my FACT TABLE with following structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;id&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;identifier&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;slug1&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;slug2&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;male&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ger&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;muc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what i*m trying to achieve is a Result Table with all possible columns depending on the input table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Result should then look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;id&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;identifier&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;gender&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;age&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;country&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;city&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;male&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;35&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;-&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;-&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;-&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ger&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;muc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it makes it clear now.&lt;/P&gt;&lt;P&gt;Thank you for any help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 08:54:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096829#M364292</guid>
      <dc:creator />
      <dc:date>2016-01-18T08:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Column Names in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096830#M364293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solved it with your suggestions of GENERIC Load &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vColumnNo = NoOfFields('InputTable')-1;&lt;/P&gt;&lt;P&gt;FOR j = 1 to $(vColumnNo)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flags:&lt;/P&gt;&lt;P&gt;Generic LOAD&lt;/P&gt;&lt;P&gt;id,&lt;/P&gt;&lt;P&gt;identifier,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;//Attribute &amp;amp; Value &lt;/P&gt;&lt;P&gt;[$(j)], slug$(j)&lt;/P&gt;&lt;P&gt;Resident FactTable;&lt;/P&gt;&lt;P&gt;NEXT j&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now i have one last problem.&lt;/P&gt;&lt;P&gt;When I´m doing the Gerneric Load in the FOR Loop, I get the error&amp;nbsp; &lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif'; color: #002060;"&gt;“Blank field name not allowed”, &lt;/SPAN&gt;if the field "value" contains blank values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I avoid this error in LOAD?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 11:04:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096830#M364293</guid>
      <dc:creator />
      <dc:date>2016-01-18T11:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Column Names in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096831#M364294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wouldn't an IF before Flags: which checks whether slug$(j) &amp;lt;&amp;gt; '' do the trick?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 12:19:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096831#M364294</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2016-01-18T12:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Column Names in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096832#M364295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unfortunately not. I think i need some interrecord function to solve this. Because i have to check if the field has any value inside&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 12:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Column-Names-in-Load-Script/m-p/1096832#M364295</guid>
      <dc:creator />
      <dc:date>2016-01-18T12:32:59Z</dc:date>
    </item>
  </channel>
</rss>

