<?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 Load SystemField Content of $Field into Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-SystemField-Content-of-Field-into-Table/m-p/476704#M178007</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;is it possible to load the content of $Field into a Table, e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x:&lt;/P&gt;&lt;P&gt;load $FIELD autogenerate 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or similar?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx - Marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Sep 2013 10:34:44 GMT</pubDate>
    <dc:creator>hugmarcel</dc:creator>
    <dc:date>2013-09-25T10:34:44Z</dc:date>
    <item>
      <title>Load SystemField Content of $Field into Table</title>
      <link>https://community.qlik.com/t5/QlikView/Load-SystemField-Content-of-Field-into-Table/m-p/476704#M178007</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;is it possible to load the content of $Field into a Table, e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x:&lt;/P&gt;&lt;P&gt;load $FIELD autogenerate 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or similar?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx - Marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 10:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-SystemField-Content-of-Field-into-Table/m-p/476704#M178007</guid>
      <dc:creator>hugmarcel</dc:creator>
      <dc:date>2013-09-25T10:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Load SystemField Content of $Field into Table</title>
      <link>https://community.qlik.com/t5/QlikView/Load-SystemField-Content-of-Field-into-Table/m-p/476705#M178008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not 100% sure, but I believe the system fields like $Field will not be accessible prior script finished execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you can access all field names loaded using the table functions in your script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;&lt;A name="kanchor1323"&gt;&lt;/A&gt;Table Functions&lt;/H1&gt;&lt;P&gt;The table functions return information about previously loaded data tables. &lt;/P&gt;&lt;P&gt;&lt;A name="kanchor1324"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="FieldName"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;FieldName(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;nr ,'TableName'&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the name of the field with the specified number within a previously loaded table. &lt;/P&gt;&lt;P&gt;If the function is used within a &lt;SPAN class="Bold"&gt;load&lt;/SPAN&gt; statement, it must not reference the table currently being loaded. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;LET a = FieldName(4,'tab1');&lt;/P&gt;&lt;P class="Code"&gt;T1:&lt;BR /&gt;Load a, b, c, d from abc.csv&lt;BR /&gt;T2: &lt;BR /&gt;Load FieldName (2, 'T1') Autogenerate 1;&lt;/P&gt;&lt;P&gt;&lt;A name="kanchor1325"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="FieldNumber"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;FieldNumber(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;'field ' ,'TableName'&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the number of a specified field within a previously loaded table. &lt;/P&gt;&lt;P&gt;If the function is used within a &lt;SPAN class="Bold"&gt;load&lt;/SPAN&gt; statement, it must not reference the table currently being loaded. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;LET a = FieldNumber('Customer','tab1');&lt;/P&gt;&lt;P class="Code"&gt;T1:&lt;BR /&gt;Load a, b, c, d from abc.csv&lt;BR /&gt;T2: &lt;BR /&gt;Load FieldNumber ('b', 'T1') Autogenerate 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A name="kanchor1326"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="NoOfFields"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;NoOfFields(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;[ 'TableName ' ]&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the number of fields in a previously loaded table. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;LET a = NoOfFields('tab1');&lt;/P&gt;&lt;P class="Code"&gt;Load *, NoOfFields( ) from abc.csv;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A name="kanchor1327"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="NoOfRows"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;NoOfRows(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;'TableName ' &lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the number of rows (records) in a previously loaded table. &lt;/P&gt;&lt;P&gt;If the function is used within a &lt;SPAN class="Bold"&gt;load&lt;/SPAN&gt; statement, it must not reference the table currently being loaded. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;LET a = NoOfRows('tab1');&lt;/P&gt;&lt;P class="Code"&gt;Load * from abc.csv where NoOfRows( )&amp;lt;30;&lt;/P&gt;&lt;P&gt;&lt;A name="kanchor1328"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="NoOfTables"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN style="background-color: #0a246a; color: #ffffff;"&gt;NoOfTables&lt;/SPAN&gt;()&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the number of tables previously loaded. &lt;/P&gt;&lt;P&gt;&lt;A name="kanchor1329"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="TableName"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;TableName(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt; 'TableNumber' &lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the name of the table with the specified number. &lt;/P&gt;&lt;P&gt;If the function is used within a &lt;SPAN class="Bold"&gt;load&lt;/SPAN&gt; statement, it must not reference the table currently being loaded. &lt;/P&gt;&lt;P&gt;&lt;A name="kanchor1330"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="TableNumber"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;TableNumber(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt; 'TableName' &lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the number of the specified table. &lt;/P&gt;&lt;P&gt;If the function is used within a &lt;SPAN class="Bold"&gt;load&lt;/SPAN&gt; statement, it must not reference the table currently being loaded. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some examples here in the forum how to iterate over all tables, all field names, something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR t = 0 TO NoOfTables() -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LET vTableName = TableName(t);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Loop through all fields/columns within the table&lt;/P&gt;&lt;P&gt;&amp;nbsp; FOR vColumnCounter = 1 TO NoOfFields(vTableName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LET vFieldName = FieldName(vColumnCounter, vTableName);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // DO SOMETHING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; NEXT&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 11:33:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-SystemField-Content-of-Field-into-Table/m-p/476705#M178008</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-09-25T11:33:00Z</dc:date>
    </item>
  </channel>
</rss>

