<?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: Create a table of column names from another table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/698#M129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this? Reference taken from here: &lt;A href="https://community.qlik.com/thread/110376"&gt;How to get a list of fields in load script?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACT:&lt;/P&gt;&lt;P&gt;LOAD yourcolumns,&lt;/P&gt;&lt;P&gt;FROM yoursource;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 1 to NoOfFields('&lt;SPAN style="font-size: 13.3333px;"&gt;FACT&lt;/SPAN&gt;')&lt;/P&gt;&lt;P&gt;Fields:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; FieldName($(i),'&lt;SPAN style="font-size: 13.3333px;"&gt;FACT&lt;/SPAN&gt;') as FieldNames&lt;/P&gt;&lt;P&gt;AutoGenerate NoOfFields('&lt;SPAN style="font-size: 13.3333px;"&gt;FACT&lt;/SPAN&gt;')&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;NEXT i&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jan 2018 04:42:56 GMT</pubDate>
    <dc:creator>vishsaggi</dc:creator>
    <dc:date>2018-01-16T04:42:56Z</dc:date>
    <item>
      <title>Create a table of column names from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/695#M126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have loaded a table ('FACT') that contains 234 columns of data.&lt;/P&gt;&lt;P&gt;I want to create a new table ('FIELDS') that has 1 column only, containing the names of those 234 columns, ie. a table with 1 column containing 234 values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this be done?&amp;nbsp; If so, how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 08:18:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/695#M126</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-15T08:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create a table of column names from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/696#M127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure, I understand your issue. Can you explain little more or try this way for a while?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mapping Load * From FACT;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FIELDS:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load *, ApplyMap('Table', 'Primary Field', 'NA') as Primary&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;From Table1;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 02:08:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/696#M127</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-01-16T02:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create a table of column names from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/697#M128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hammond,&lt;/P&gt;&lt;P&gt;I think you should used Cross Table.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;Link : &lt;/SPAN&gt;&lt;A href="http://help.qlik.com/en-US/sense/September2017/Subsystems/Hub/Content/LoadData/work-with-cross-tables.htm" style="font-size: 10pt;" title="http://help.qlik.com/en-US/sense/September2017/Subsystems/Hub/Content/LoadData/work-with-cross-tables.htm"&gt;Working with crosstables in the data load script ‒ Qlik Sense&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help&lt;/P&gt;&lt;P&gt;Justin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 03:24:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/697#M128</guid>
      <dc:creator>justinphamvn</dc:creator>
      <dc:date>2018-01-16T03:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create a table of column names from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/698#M129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this? Reference taken from here: &lt;A href="https://community.qlik.com/thread/110376"&gt;How to get a list of fields in load script?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACT:&lt;/P&gt;&lt;P&gt;LOAD yourcolumns,&lt;/P&gt;&lt;P&gt;FROM yoursource;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 1 to NoOfFields('&lt;SPAN style="font-size: 13.3333px;"&gt;FACT&lt;/SPAN&gt;')&lt;/P&gt;&lt;P&gt;Fields:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; FieldName($(i),'&lt;SPAN style="font-size: 13.3333px;"&gt;FACT&lt;/SPAN&gt;') as FieldNames&lt;/P&gt;&lt;P&gt;AutoGenerate NoOfFields('&lt;SPAN style="font-size: 13.3333px;"&gt;FACT&lt;/SPAN&gt;')&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;NEXT i&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 04:42:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/698#M129</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-01-16T04:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create a table of column names from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/699#M130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestions, but none of them worked.&lt;/P&gt;&lt;P&gt;I eventually solved it by constructing a string of field names delimited by a carriage return (ASCII code 13).&lt;/P&gt;&lt;P&gt;The code I used was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set vList=;&lt;/P&gt;&lt;P&gt;set vDelimiter=CHR(13);&lt;/P&gt;&lt;P&gt;for i = 1 to NoOfFields('FACT')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; let vFieldName = FieldName($(i), 'FACT');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; let vList = '$(vList)' &amp;amp; $(vDelimiter) &amp;amp; '$(vFieldName)';&lt;/P&gt;&lt;P&gt;next i&lt;/P&gt;&lt;P&gt;TMP:&lt;/P&gt;&lt;P&gt;load * inline [ &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; COLUMN_NAME&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; $(vList)&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;COLUMNS:&lt;/P&gt;&lt;P&gt;noconcatenate&lt;/P&gt;&lt;P&gt;load COLUMN_NAME&lt;/P&gt;&lt;P&gt;resident TMP&lt;/P&gt;&lt;P&gt;order by COLUMN_NAME asc;&lt;/P&gt;&lt;P&gt;drop table TMP; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 13:18:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/699#M130</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-16T13:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create a table of column names from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/700#M131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad you figured it out. However, Your initial question was very generic. Not knowing your full requirement we could not produce exact solution hence provided possible solutions. Please Close the thread marking correct/helpful responses accordingly. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 16:29:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/700#M131</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-01-16T16:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create a table of column names from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/1991862#M1221276</link>
      <description>&lt;P&gt;I like this recursive way of doing this with a variable referencing itself in the for loop. I would have probably looped through concatenating onto a table with each field name, but this seems much more efficient. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 15:33:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-table-of-column-names-from-another-table/m-p/1991862#M1221276</guid>
      <dc:creator>KeaneGleeson</dc:creator>
      <dc:date>2022-10-12T15:33:09Z</dc:date>
    </item>
  </channel>
</rss>

