<?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: FieldName not working as expected? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FieldName-not-working-as-expected/m-p/488227#M693701</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wouldn't do it that way. Access the XML structure as this ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLE_FIELDS:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rowno() as FIELD_NUMBER,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FieldName as FIELD_NAME&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM [{name}.qvd] (XmlSimple, Table is [QvdTableHeader/Fields/QvdFieldHeader]);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.. really simple and quick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flipside&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: If querying multiple qvds, then the Rowno() will continue incrementing from last stored value, so RecNo() might be neaded to give you the Field_Number within the QVD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jun 2013 14:20:16 GMT</pubDate>
    <dc:creator>flipside</dc:creator>
    <dc:date>2013-06-19T14:20:16Z</dc:date>
    <item>
      <title>FieldName not working as expected?</title>
      <link>https://community.qlik.com/t5/QlikView/FieldName-not-working-as-expected/m-p/488226#M693700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to create a table that holds the names and position numbers of fields in a QVD.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if I have a QVD with the following fields:&lt;/P&gt;&lt;P&gt;FIELDA, FIELDB, FIELDC&lt;/P&gt;&lt;P&gt;The table would be:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;FIELDNAME&lt;/SPAN&gt; &lt;SPAN style="text-decoration: underline;"&gt;FIELDPOSITION&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FIELDA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;FIELDB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;FIELDC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script I've written for this is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;EMPTYTABLE:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;FROM &lt;EM&gt;QVDNAME&lt;/EM&gt; (qvd)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;where 1 = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;TABLE_FIELDS:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;load IterNo() as FIELD_NUMBER,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt; FieldName(IterNo(), 'EMPTYTABLE') as FIELD_NAME&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;autogenerate 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;while IterNo() &amp;lt; NoOfFields('EMPTYTABLE');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN&gt;&lt;SPAN&gt;This produces a table with the correct number of rows.&amp;nbsp; FIELD_NUMBER is populated correctly but FIELD_NAME is null.&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN&gt;&lt;SPAN&gt;Have I missed something obvious?&amp;nbsp; I'd be greatful for any help/explanations!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jun 2013 14:03:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FieldName-not-working-as-expected/m-p/488226#M693700</guid>
      <dc:creator>northerner</dc:creator>
      <dc:date>2013-06-19T14:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: FieldName not working as expected?</title>
      <link>https://community.qlik.com/t5/QlikView/FieldName-not-working-as-expected/m-p/488227#M693701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wouldn't do it that way. Access the XML structure as this ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLE_FIELDS:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rowno() as FIELD_NUMBER,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FieldName as FIELD_NAME&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM [{name}.qvd] (XmlSimple, Table is [QvdTableHeader/Fields/QvdFieldHeader]);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.. really simple and quick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flipside&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: If querying multiple qvds, then the Rowno() will continue incrementing from last stored value, so RecNo() might be neaded to give you the Field_Number within the QVD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jun 2013 14:20:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FieldName-not-working-as-expected/m-p/488227#M693701</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2013-06-19T14:20:16Z</dc:date>
    </item>
  </channel>
</rss>

