<?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: What's the difference between use or omit the let statement for defining variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/What-s-the-difference-between-use-or-omit-the-let-statement-for/m-p/1737361#M452717</link>
    <description>&lt;P&gt;I suggest to use always the regular statements because like Rubin mentioned they may one day not be optional anymore.&lt;/P&gt;&lt;P&gt;Unfortunately the Qlik help isn't very detailed in regard to omit the LET statement but the mention of being now a control-statement should be taken as a serious hint that's not the same to apply or to omit it. There is at least one general difference between them which I know and that's the validity. Normal defined LET/SET variables are always global while control-statements itself and there created variables or further nested control-statements have an own reduced validity.&lt;/P&gt;&lt;P&gt;Maybe there are here and there further hints within the Qlik help by the various control-statements to their special properties whereby I doubt that they would be very detailed in this case, too.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Thu, 20 Aug 2020 12:38:21 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2020-08-20T12:38:21Z</dc:date>
    <item>
      <title>What's the difference between use or omit the let statement for defining variables</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-difference-between-use-or-omit-the-let-statement-for/m-p/1737058#M452696</link>
      <description>&lt;P&gt;I'd like to know if there is some difference between using the Let statement for defining variables or simply omit it. On the official QlikHelp website there is an example like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Result&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="Code"&gt;Set x=3+4;&lt;/P&gt;&lt;P class="Code"&gt;Let y=3+4;&lt;/P&gt;&lt;P class="Code"&gt;z=$(y)+1;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;$(x)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;will be evaluated as '&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;3+4&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;'&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;$(y)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;will be evaluated as '&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;7&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;'&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;$(z)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;will be evaluated as '&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;8&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;'&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In addition to these examples, I've been doing tests by myselft and the both one seems to work exactly the same. The only difference I found out between defining or not a variable was&amp;nbsp; that if you don't, It&amp;nbsp;&lt;SPAN&gt;may be terminated either with a semicolon or end-of-line.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Qlik Offcial Documentation also says that when you omit the word let,&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;the statement then becomes a control statement.&amp;nbsp;&lt;/STRONG&gt;What I don't understand.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is one option different to the another? And if they aren't, What's the best option to use?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Excuse the questions but I'm pretty new on Qlik Sense.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:12:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-difference-between-use-or-omit-the-let-statement-for/m-p/1737058#M452696</guid>
      <dc:creator>Logistix</dc:creator>
      <dc:date>2024-11-16T18:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: What's the difference between use or omit the let statement for defining variables</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-difference-between-use-or-omit-the-let-statement-for/m-p/1737139#M452701</link>
      <description>&lt;P&gt;Hi, I have done some test and I don't see any difference using 'LET' or omiiting it. Anyway I will keep using LET to assign a calculated value in case future versions require the keyword.&lt;/P&gt;&lt;P&gt;I don't see how can affect than the synax is considered a control statement. Anyway I haven't found that in documentation (with a quick search), can you link where it says that?.&lt;/P&gt;&lt;P&gt;What I have found is that control statements may assign variable values, in example a for..next bucle assigns a differnt value to the same variable in each iteration.&lt;/P&gt;&lt;P&gt;CAn you link the offical documentt&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 15:13:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-difference-between-use-or-omit-the-let-statement-for/m-p/1737139#M452701</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-08-19T15:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: What's the difference between use or omit the let statement for defining variables</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-difference-between-use-or-omit-the-let-statement-for/m-p/1737260#M452711</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First of all thanks a lot for your reply and trying to help me. I drop the link below where you can find exactly this piece of text:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The word&amp;nbsp;let&amp;nbsp;may be omitted, but the statement then becomes a control statement. Such a statement without the keyword&amp;nbsp;let&amp;nbsp;must be contained within a single script row and may be terminated either with a semicolon or end-of-line.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Let.htm&amp;nbsp;" target="_blank" rel="noopener"&gt;https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Let.htm&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 07:06:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-difference-between-use-or-omit-the-let-statement-for/m-p/1737260#M452711</guid>
      <dc:creator>Logistix</dc:creator>
      <dc:date>2020-08-20T07:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: What's the difference between use or omit the let statement for defining variables</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-difference-between-use-or-omit-the-let-statement-for/m-p/1737361#M452717</link>
      <description>&lt;P&gt;I suggest to use always the regular statements because like Rubin mentioned they may one day not be optional anymore.&lt;/P&gt;&lt;P&gt;Unfortunately the Qlik help isn't very detailed in regard to omit the LET statement but the mention of being now a control-statement should be taken as a serious hint that's not the same to apply or to omit it. There is at least one general difference between them which I know and that's the validity. Normal defined LET/SET variables are always global while control-statements itself and there created variables or further nested control-statements have an own reduced validity.&lt;/P&gt;&lt;P&gt;Maybe there are here and there further hints within the Qlik help by the various control-statements to their special properties whereby I doubt that they would be very detailed in this case, too.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 12:38:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-difference-between-use-or-omit-the-let-statement-for/m-p/1737361#M452717</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-08-20T12:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: What's the difference between use or omit the let statement for defining variables</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-difference-between-use-or-omit-the-let-statement-for/m-p/1740974#M452921</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/122424"&gt;@Logistix&lt;/a&gt;&amp;nbsp; So, on the Help page, what you can do is use the 'Did this information...' dialog at the bottom of the section in question to leave the Doc Team a note on what you feel is confusing etc., they are very good about looking at the comments that are submitted and trying to improve things, so I think this is our best avenue on this one to be sure things get updated to reflect better guidance.&amp;nbsp; Let me know if you have questions, but hopefully it makes sense, may take a number of weeks, but they should update based upon what you provide in the way of feedback on things.&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 12:51:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-difference-between-use-or-omit-the-let-statement-for/m-p/1740974#M452921</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-09-03T12:51:36Z</dc:date>
    </item>
  </channel>
</rss>

