<?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: SET EVALUATE in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SET-EVALUATE/m-p/1417296#M803655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems to be correct to me, what do you see as wrong?&lt;/P&gt;&lt;P&gt;What do you expect to see?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Nov 2017 10:08:24 GMT</pubDate>
    <dc:creator>Clever_Anjos</dc:creator>
    <dc:date>2017-11-06T10:08:24Z</dc:date>
    <item>
      <title>SET EVALUATE</title>
      <link>https://community.qlik.com/t5/QlikView/SET-EVALUATE/m-p/1417295#M803654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;I have specified Set x=3+4; in script and when i evaluate as =$(x) in text box, it gives 7.Why is that so ?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-EVALUATE/m-p/1417295#M803654</guid>
      <dc:creator>pradeep92</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: SET EVALUATE</title>
      <link>https://community.qlik.com/t5/QlikView/SET-EVALUATE/m-p/1417296#M803655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems to be correct to me, what do you see as wrong?&lt;/P&gt;&lt;P&gt;What do you expect to see?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2017 10:08:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-EVALUATE/m-p/1417296#M803655</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2017-11-06T10:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: SET EVALUATE</title>
      <link>https://community.qlik.com/t5/QlikView/SET-EVALUATE/m-p/1417297#M803656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your required output?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2017 10:13:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-EVALUATE/m-p/1417297#M803656</guid>
      <dc:creator>prma7799</dc:creator>
      <dc:date>2017-11-06T10:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: SET EVALUATE</title>
      <link>https://community.qlik.com/t5/QlikView/SET-EVALUATE/m-p/1417298#M803657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Off course, Because you are computing using $() indicator. Remove that and check with simple x ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set x=3+4; //vVar has the expression 2+3 as value we have to compute it using $(vVar) which returns 5&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Let x=3+4; //vVar has the computed value 5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2017 10:47:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-EVALUATE/m-p/1417298#M803657</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-11-06T10:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: SET EVALUATE</title>
      <link>https://community.qlik.com/t5/QlikView/SET-EVALUATE/m-p/1417299#M803658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The different engines involved act like that because of two simple reasons:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;text literal assignment (scripting engine), and&lt;/LI&gt;&lt;LI&gt;text substitution (expression evaluator)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A &lt;SPAN style="font-family: 'courier new', courier;"&gt;SET&lt;/SPAN&gt; statement assigns the right hand part &lt;EM&gt;as-is&lt;/EM&gt; to the variable specified in the left hand part. So&lt;SPAN style="font-family: 'courier new', courier;"&gt; x&lt;/SPAN&gt; will contain string '&lt;SPAN style="font-family: 'courier new', courier;"&gt;3+4&lt;/SPAN&gt;'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in the expression, the evaluator will perform $-sign substitution first, before doing anything else. That gets the original expression &lt;SPAN style="font-family: 'courier new', courier;"&gt;=$(x)&lt;/SPAN&gt; converted into &lt;SPAN style="font-family: 'courier new', courier;"&gt;=3+4&lt;/SPAN&gt; after which the expression is finally evaluated and produces a fixed value of 7. That one gets displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that what applies to the expression with respect to $-sign substitution always coming first, also applies to the right-hand part of the &lt;SPAN style="font-family: 'courier new', courier;"&gt;SET&lt;/SPAN&gt; statement. $-sign substitution in the right-hand part of a &lt;SPAN style="font-family: 'courier new', courier;"&gt;SET&lt;/SPAN&gt; statement will be applied even before the scripting engine tries to figure out what statement it is looking at. And that's the main reason why stuff like the following even works at all !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SET y = SET;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;$(y) x = 3+4;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this explanation is unclear, please ask away.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2017 10:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-EVALUATE/m-p/1417299#M803658</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-11-06T10:50:39Z</dc:date>
    </item>
  </channel>
</rss>

