<?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: Issue with If in load script at column level in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678475#M671828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use something like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;if('A'='A',Aname,Null()) as TName,&lt;/P&gt;&lt;P&gt;* INLINE [&lt;/P&gt;&lt;P&gt;Aname, Aqty&lt;/P&gt;&lt;P&gt;Angad,2&lt;/P&gt;&lt;P&gt;Singh,3&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Sep 2014 07:59:41 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-09-24T07:59:41Z</dc:date>
    <item>
      <title>Issue with If in load script at column level</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678467#M671820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My understanding is that, for IF condition, wherever condition is satisfied, it comes out of the IF, but it does not seem like that.&lt;/P&gt;&lt;P&gt;In below, I do not have &lt;STRONG&gt;Bname&lt;/STRONG&gt; as column in the table, but the hardcode condition should actually skip the else aprt, but it is not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;if('A'='A',Aname,Bname) as TName,&lt;/P&gt;&lt;P&gt;* INLINE [&lt;/P&gt;&lt;P&gt;Aname, Aqty&lt;/P&gt;&lt;P&gt;Angad,2&lt;/P&gt;&lt;P&gt;Singh,3&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives error that Bname column not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Angad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 06:30:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678467#M671820</guid>
      <dc:creator />
      <dc:date>2014-09-24T06:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with If in load script at column level</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678468#M671821</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;Of course you'll get this error, because you don't have a definition of Bname in your inline table.&lt;/P&gt;&lt;P&gt;Just add it there and you can leave it empty, error will gone.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update: this code will work without errors&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;if('A'='A',Aname,Bname) as TName,&lt;/P&gt;&lt;P&gt;* INLINE [&lt;/P&gt;&lt;P&gt;Aname, Aqty,Bname&lt;/P&gt;&lt;P&gt;Angad,2&lt;/P&gt;&lt;P&gt;Singh,3&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrei&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 06:37:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678468#M671821</guid>
      <dc:creator>crusader_</dc:creator>
      <dc:date>2014-09-24T06:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with If in load script at column level</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678469#M671822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It fails during syntax validation in script, since it didn't find the field Bname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At runtime, expression &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'A'='A' is evaluated and assigns Aname&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 06:43:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678469#M671822</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-09-24T06:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with If in load script at column level</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678470#M671823</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;If you use Bname as 'Bname' then it will work and it won't throw any error while loading. &lt;/P&gt;&lt;P&gt;if('A'='A',Aname,'Bname') as TName,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qlikview throws error as it searches for all fields written in the load script. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 06:44:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678470#M671823</guid>
      <dc:creator />
      <dc:date>2014-09-24T06:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with If in load script at column level</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678471#M671824</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;i thin this isn't 100 % correct. There isn't a column with the name 'A', also you don't have a fieldvalue like 'A', so this won't work. Have a look at the example, this gives you an idea how if works:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;if(Aname='Angad',Aname,Bname) as TName,&lt;/P&gt;&lt;P&gt;* INLINE [&lt;/P&gt;&lt;P&gt;Aname, Aqty,Bname&lt;/P&gt;&lt;P&gt;Angad,2&lt;/P&gt;&lt;P&gt;Singh,3&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 06:46:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678471#M671824</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-24T06:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with If in load script at column level</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678472#M671825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Andrei, but in original request I cannot add the dummy column in my qvd. So you mean that the if condition traverses the whole line irrespective of condition in case of using columns. Isnt it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 06:47:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678472#M671825</guid>
      <dc:creator />
      <dc:date>2014-09-24T06:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with If in load script at column level</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678473#M671826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No. The error message comes as a result of &lt;STRONG&gt;parsing&lt;/STRONG&gt; test(syntax). Even before going to execute your if statement or any other statement in the context of original data load, the QV parser has to check for the valid syntax. And there fails your statement, because when the parser finds &lt;STRONG&gt;Bname &lt;/STRONG&gt;, it expects it to be a field which can't be sourced. Hence the error. Therefore, in brief your script fails at parsing and &lt;STRONG&gt;not&lt;/STRONG&gt; &lt;EM&gt;at if statement execution&lt;/EM&gt; (it doesn't even go to that phase of execution). Hope this helps comprehend.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 07:00:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678473#M671826</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-09-24T07:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with If in load script at column level</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678474#M671827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its failed on Syntax check, Since there is no field called Bname&lt;/P&gt;&lt;P&gt;You could do it by using variable instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vFieldAB = I&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;f('A'='A','Aname','Bname');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;and use the variable in LOAD statement like below&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;test:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;$(vFieldAB) as TName, &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;* INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Aname, Aqty&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Angad,2&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Singh,3&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 07:02:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678474#M671827</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2014-09-24T07:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with If in load script at column level</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678475#M671828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use something like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;if('A'='A',Aname,Null()) as TName,&lt;/P&gt;&lt;P&gt;* INLINE [&lt;/P&gt;&lt;P&gt;Aname, Aqty&lt;/P&gt;&lt;P&gt;Angad,2&lt;/P&gt;&lt;P&gt;Singh,3&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 07:59:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678475#M671828</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-09-24T07:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with If in load script at column level</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678476#M671829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set ErrorMode = 0 ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 08:25:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-If-in-load-script-at-column-level/m-p/678476#M671829</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2014-09-24T08:25:46Z</dc:date>
    </item>
  </channel>
</rss>

