<?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 IF statement - field not found in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236888#M88017</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you get the same error when you use:&lt;/P&gt;&lt;P&gt;Load ColumnDate;&lt;BR /&gt;SQL SELECT * FROM FactTable;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 May 2011 08:09:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-05-02T08:09:31Z</dc:date>
    <item>
      <title>IF statement - field not found</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236887#M88016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have following issue. I want to adjust QV document for different version of source data. Usually in newest version there are new columns available in tables. What I want to do in QV is that the document will decide if this new field will be loaded or not.&lt;/P&gt;&lt;P&gt;I used IF statement like:&lt;BR /&gt;*****************************************************&lt;BR /&gt;SET vDWLSourceVer=6.0109;&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;IF($(vDWLSourceVer)&amp;gt;=7.0201,ColumnDate,NULL()) as [ColumnDate];&lt;BR /&gt;SQL SELECT * FROM FactTable;&lt;/P&gt;&lt;P&gt;The QV throw error: Field not found - &amp;lt;ColumnDate&amp;gt;, even it's not evaluated by IF clause? Is it there some other solution?&lt;/P&gt;&lt;P&gt;Any suggestion?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 08:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236887#M88016</guid>
      <dc:creator />
      <dc:date>2011-05-02T08:05:52Z</dc:date>
    </item>
    <item>
      <title>IF statement - field not found</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236888#M88017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you get the same error when you use:&lt;/P&gt;&lt;P&gt;Load ColumnDate;&lt;BR /&gt;SQL SELECT * FROM FactTable;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 08:09:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236888#M88017</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-02T08:09:31Z</dc:date>
    </item>
    <item>
      <title>IF statement - field not found</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236889#M88018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I get, because I know that the ColumnDate isn't in the DB. The ColumnDate is in newer version of source DB (higher than 6.0109).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 08:13:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236889#M88018</guid>
      <dc:creator />
      <dc:date>2011-05-02T08:13:25Z</dc:date>
    </item>
    <item>
      <title>IF statement - field not found</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236890#M88019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If have to make an if-statement outside the load script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try something that looks like this: &lt;/P&gt;&lt;P&gt;SET vDWLSourceVer=6.0109;&lt;/P&gt;&lt;P&gt;IF($(vDWLSourceVer)&amp;gt;7.0201) THEN&lt;/P&gt;&lt;P&gt; Table:&lt;/P&gt;&lt;P&gt;Load &amp;lt;YOUR FIELDS WITHOUT ColumnDate&amp;gt; , &lt;/P&gt;&lt;P&gt;null() as ColumnDate;&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM FactTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;Load abc, def, ColumnDate;&lt;/P&gt;&lt;P&gt; SQL SELECT * FROM FactTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich Shiino&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 02:11:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236890#M88019</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-05-09T02:11:43Z</dc:date>
    </item>
    <item>
      <title>IF statement - field not found</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236891#M88020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved!&lt;/P&gt;&lt;P&gt;I applied variable text to be as column.&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET &lt;/STRONG&gt;vDWLSourceVer=6.0109;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;SET &lt;/STRONG&gt;vvColumnDate=if($(vDWLSourceVer)&amp;gt;=7.0201,'ColumnDate','NULL()'); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Table&lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*,&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;$(vvColumnDate)&lt;/SPAN&gt; as &lt;/STRONG&gt;[ColumnDate];&lt;BR /&gt;&lt;STRONG&gt;SQL SELECT * FROM &lt;/STRONG&gt;FactTable;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2011 05:14:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236891#M88020</guid>
      <dc:creator />
      <dc:date>2011-05-27T05:14:43Z</dc:date>
    </item>
    <item>
      <title>IF statement - field not found</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236892#M88021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I´m with a very similar trouble..&lt;/P&gt;&lt;P&gt;I have a folder with a lot of txt files.. two kinds of estructures..&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;one has 3 fields (A,B,C)&lt;/LI&gt;&lt;LI&gt;other has 2 fields (A,B)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do a load script that if the file don´t have the C field load null() as C, if not, load C ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can´t do it munually because I don´t know who is who..&lt;/P&gt;&lt;P&gt;Look simple but i´m doing something wrong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 02:06:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236892#M88021</guid>
      <dc:creator />
      <dc:date>2012-03-07T02:06:11Z</dc:date>
    </item>
    <item>
      <title>IF statement - field not found</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236893#M88022</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;Just use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TableName:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;FROM DataSource;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't specify any column names, if the table has 2 columns it loads 2, if table has 3 it loads 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 05:24:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236893#M88022</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-03-07T05:24:34Z</dc:date>
    </item>
    <item>
      <title>IF statement - field not found</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236894#M88023</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;You should the script as Shiino suggested, because it creates the column ColumnDate if it really has, but your script always creates a ColumnDate with Null/Values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 05:26:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236894#M88023</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-03-07T05:26:59Z</dc:date>
    </item>
    <item>
      <title>IF statement - field not found</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236895#M88024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Jagan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fernando Tonial help me with this point with a very simple way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firts of all, load null() with all files..&lt;/P&gt;&lt;P&gt;After, a Concatenate LOAD *..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that´s it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 01:51:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-field-not-found/m-p/236895#M88024</guid>
      <dc:creator />
      <dc:date>2012-03-13T01:51:13Z</dc:date>
    </item>
  </channel>
</rss>

