<?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 is the correct syntax for endif? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/what-is-the-correct-syntax-for-endif/m-p/1673653#M449571</link>
    <description>&lt;UL&gt;&lt;LI&gt;No it doesn't matter - you are free to use either ENDIF or END IF&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;No you don't need a semicolon afterwards. It belongs to the group of script statements called "control statements" they have to stay on a single line and will be terminated either by a new line or a semicolon which is optional.&lt;/LI&gt;&lt;LI&gt;QlikView doesn't complain although it is a bit odd - the result is that all the rest of the load script belongs to the ELSE part. So it is a pretty bad idea leaving ENDIF out.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptControlStatements/script-control-statements.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptControlStatements/script-control-statements.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 09 Feb 2020 18:00:32 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2020-02-09T18:00:32Z</dc:date>
    <item>
      <title>what is the correct syntax for endif?</title>
      <link>https://community.qlik.com/t5/QlikView/what-is-the-correct-syntax-for-endif/m-p/1673641#M449569</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using an if...then statement and I was wondering what the correct syntax to end it would be.&lt;/P&gt;&lt;P&gt;The help says it is 'end if' -&amp;gt; with space and semicolon&lt;/P&gt;&lt;P&gt;The autocomplete suggests 'endif'&lt;/P&gt;&lt;P&gt;So my question is:&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;do I need to use a space between endif, or does it make a difference?&lt;/LI&gt;&lt;LI&gt;do I need to use a semicolon afterwards?&lt;/LI&gt;&lt;LI&gt;do I need to use endif AT ALL (cause it seems to work witout it)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I was just trying something simple like:&lt;/P&gt;&lt;P&gt;if ComputerName() = '01.....' then&lt;/P&gt;&lt;P&gt;SET test = 1;&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;SET test = 2;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any help. Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 17:08:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-is-the-correct-syntax-for-endif/m-p/1673641#M449569</guid>
      <dc:creator>nigel987</dc:creator>
      <dc:date>2020-02-09T17:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: what is the correct syntax for endif?</title>
      <link>https://community.qlik.com/t5/QlikView/what-is-the-correct-syntax-for-endif/m-p/1673653#M449571</link>
      <description>&lt;UL&gt;&lt;LI&gt;No it doesn't matter - you are free to use either ENDIF or END IF&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;No you don't need a semicolon afterwards. It belongs to the group of script statements called "control statements" they have to stay on a single line and will be terminated either by a new line or a semicolon which is optional.&lt;/LI&gt;&lt;LI&gt;QlikView doesn't complain although it is a bit odd - the result is that all the rest of the load script belongs to the ELSE part. So it is a pretty bad idea leaving ENDIF out.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptControlStatements/script-control-statements.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptControlStatements/script-control-statements.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 18:00:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-is-the-correct-syntax-for-endif/m-p/1673653#M449571</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2020-02-09T18:00:32Z</dc:date>
    </item>
  </channel>
</rss>

