<?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>article Syntax Highlighting is turned off in the script editor when there is a nested IF with more than 9 recursion levels in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Syntax-Highlighting-is-turned-off-in-the-script-editor-when/ta-p/1716275</link>
    <description>&lt;P&gt;In Qlik Sense, when there is a commented out portion of the script, if "//" is deleted and the script is saved, all the text will turn black and all syntax highlighting will be lost. If pages of the script are toggled between, a message that says "we have disabled syntax highlight to maintain performance" appears and the highlighting will come back but if previous steps are followed again,commenting will also be disabled again.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is working as designed.&lt;/P&gt;
&lt;P&gt;It is the current solution for dealing with deeply nested if statements. In many cases these deeply nested if blocks will cause real performance issues (crashing the browser). The best practice is to not use nested ifs when possible. The commenting/uncommenting works because we count the levels. Pretty sure 10 levels deep we trigger the perf warning. So if they comment out one and it's only 9 it won't complain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;Environment:&amp;nbsp;&lt;/H4&gt;
&lt;DIV&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise on Windows" id="qlikSenseEnterpriseWindows"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;BR /&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise SaaS" id="qlikSenseEnterpriseSaaS"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;BR /&gt;&lt;LI-PRODUCT title="Qlik Sense Business" id="qlikSenseBusiness"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;H4&gt;Internal Investigation ID(s):&lt;/H4&gt;
&lt;DIV&gt;QLIK-93629&lt;/DIV&gt;</description>
    <pubDate>Tue, 10 May 2022 19:21:58 GMT</pubDate>
    <dc:creator>Sonja_Bauernfeind</dc:creator>
    <dc:date>2022-05-10T19:21:58Z</dc:date>
    <item>
      <title>Syntax Highlighting is turned off in the script editor when there is a nested IF with more than 9 recursion levels</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Syntax-Highlighting-is-turned-off-in-the-script-editor-when/ta-p/1716275</link>
      <description>&lt;P&gt;In Qlik Sense, when there is a commented out portion of the script, if "//" is deleted and the script is saved, all the text will turn black and all syntax highlighting will be lost. If pages of the script are toggled between, a message that says "we have disabled syntax highlight to maintain performance" appears and the highlighting will come back but if previous steps are followed again,commenting will also be disabled again.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is working as designed.&lt;/P&gt;
&lt;P&gt;It is the current solution for dealing with deeply nested if statements. In many cases these deeply nested if blocks will cause real performance issues (crashing the browser). The best practice is to not use nested ifs when possible. The commenting/uncommenting works because we count the levels. Pretty sure 10 levels deep we trigger the perf warning. So if they comment out one and it's only 9 it won't complain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;Environment:&amp;nbsp;&lt;/H4&gt;
&lt;DIV&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise on Windows" id="qlikSenseEnterpriseWindows"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;BR /&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise SaaS" id="qlikSenseEnterpriseSaaS"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;BR /&gt;&lt;LI-PRODUCT title="Qlik Sense Business" id="qlikSenseBusiness"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;H4&gt;Internal Investigation ID(s):&lt;/H4&gt;
&lt;DIV&gt;QLIK-93629&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 May 2022 19:21:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Syntax-Highlighting-is-turned-off-in-the-script-editor-when/ta-p/1716275</guid>
      <dc:creator>Sonja_Bauernfeind</dc:creator>
      <dc:date>2022-05-10T19:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Highlighting is turned off in the script editor when there is a nested IF with more than 9 recursion levels</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Syntax-Highlighting-is-turned-off-in-the-script-editor-when/tac-p/1888843#M5467</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;Is there a workaround for that? What if I need to have more than 9 iterations of nested ifs?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 17:16:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Syntax-Highlighting-is-turned-off-in-the-script-editor-when/tac-p/1888843#M5467</guid>
      <dc:creator>GHasan</dc:creator>
      <dc:date>2022-02-03T17:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Highlighting is turned off in the script editor when there is a nested IF with more than 9 recursion levels</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Syntax-Highlighting-is-turned-off-in-the-script-editor-when/tac-p/1892960#M5568</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145692"&gt;@GHasan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is working as designed and no direct workaround is available. I would recommend posting about your requirement in the fitting forum to see what best practices our users are following. This would be the appropriate forum:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/App-Development/bd-p/qlik-sense-app-development" target="_blank" rel="noopener"&gt;Qlik Sense App Development&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 09:47:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Syntax-Highlighting-is-turned-off-in-the-script-editor-when/tac-p/1892960#M5568</guid>
      <dc:creator>Sonja_Bauernfeind</dc:creator>
      <dc:date>2022-02-15T09:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Highlighting is turned off in the script editor when there is a nested IF with more than 9 recursion levels</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Syntax-Highlighting-is-turned-off-in-the-script-editor-when/tac-p/2086213#M9491</link>
      <description>&lt;P&gt;I did some further testing (using the current SaaS Cloud version). &lt;BR /&gt;&lt;BR /&gt;10 seems to still&amp;nbsp; work, 11 not. E.g.:&lt;/P&gt;
&lt;P&gt;Load&amp;nbsp; *,&lt;BR /&gt;if( a, if (b, if(c, if(d , if( e, if (f, if(g, if(h , if(i,if(j, //if(k,&lt;BR /&gt;1,0 )))) )))) ))&amp;nbsp; // )&lt;BR /&gt;as a0&lt;BR /&gt;resident table; &lt;BR /&gt;still works&lt;BR /&gt;&lt;BR /&gt;BUT there is a hidden second case which I have seen where you run into this: &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Load &lt;BR /&gt;*,&lt;BR /&gt;if( Text = '1' or Text = '2' or Text = '3' or Text = '4' or Text = '5' or Text = '6' or Text = '7' or Text = '8' or Text = '9' or Text = '10' or Text = '11' , 1,0 ) as a1 &lt;/P&gt;
&lt;P&gt;resident table;&amp;nbsp; // also no highlighting&lt;BR /&gt;&lt;BR /&gt;So OR also counts as a nested if! &lt;BR /&gt;In that specific case you should use match( ) or&amp;nbsp; more generally prefer a mapping to avoid the deactivated syntax highlighting.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 09:54:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Syntax-Highlighting-is-turned-off-in-the-script-editor-when/tac-p/2086213#M9491</guid>
      <dc:creator>john_oll</dc:creator>
      <dc:date>2023-06-21T09:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Highlighting is turned off in the script editor when there is a nested IF with more than 9 recursion levels</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Syntax-Highlighting-is-turned-off-in-the-script-editor-when/tac-p/2510715#M15565</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;this is not a nested if problem.&amp;nbsp; we have several apps with this issue.&amp;nbsp; one I just created a few days ago and this problem just started after qlik dropped my connection several times and had calculation timeouts.&amp;nbsp; i'm guessing this is more a memory or connectivity problem.&lt;/P&gt;&lt;P&gt;Upon further research this bug is caused when a script section is 500+ lines. Not sure what the issue is with large scripts but we've looked at several small/large scripts and either the # of lines is the issue or its related to the issue&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 19 Mar 2025 18:41:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Syntax-Highlighting-is-turned-off-in-the-script-editor-when/tac-p/2510715#M15565</guid>
      <dc:creator>markperrone</dc:creator>
      <dc:date>2025-03-19T18:41:54Z</dc:date>
    </item>
  </channel>
</rss>

