<?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 Escape sequence in IF condition in Load Script. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1686986#M52329</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I am trying to enter&amp;nbsp; the below If condition in Load Script and it not working because of not using Escape Sequence.&lt;/P&gt;&lt;P&gt;&amp;nbsp;if(today() &amp;gt;= [Calendar day] , &lt;STRONG&gt;'Week' &amp;amp;' '&amp;amp;Week([Calendar day]) &amp;amp;'('&amp;amp; Year([Calendar day])&amp;amp;')'&lt;/STRONG&gt; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could some one tell me best way to use the above condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 02:54:38 GMT</pubDate>
    <dc:creator>LP27</dc:creator>
    <dc:date>2024-11-16T02:54:38Z</dc:date>
    <item>
      <title>Escape sequence in IF condition in Load Script.</title>
      <link>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1686986#M52329</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I am trying to enter&amp;nbsp; the below If condition in Load Script and it not working because of not using Escape Sequence.&lt;/P&gt;&lt;P&gt;&amp;nbsp;if(today() &amp;gt;= [Calendar day] , &lt;STRONG&gt;'Week' &amp;amp;' '&amp;amp;Week([Calendar day]) &amp;amp;'('&amp;amp; Year([Calendar day])&amp;amp;')'&lt;/STRONG&gt; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could some one tell me best way to use the above condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:54:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1686986#M52329</guid>
      <dc:creator>LP27</dc:creator>
      <dc:date>2024-11-16T02:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Escape sequence in IF condition in Load Script.</title>
      <link>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1686993#M52330</link>
      <description>&lt;P&gt;Assuming you need to create an extra field by using the if statement, if so, you need to drop the "=" character and use something like below:&lt;/P&gt;&lt;P&gt;TableName:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;[YourFields],&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(today() &amp;gt;= [Calendar day] ,&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;'Week' &amp;amp;' '&amp;amp;Week([Calendar day]) &amp;amp;'('&amp;amp; Year([Calendar day])&amp;amp;')'&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;) as [New Field]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;From &amp;lt;YourSource&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Otherwise, please provide a clear explanation, i.e., the purpose, your expectation, sample dataset, etc.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 14:03:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1686993#M52330</guid>
      <dc:creator>TimvB</dc:creator>
      <dc:date>2020-03-23T14:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Escape sequence in IF condition in Load Script.</title>
      <link>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1686995#M52331</link>
      <description>&lt;P&gt;Can you share a script where this doesn't work? I don't see a need for escape sequence here.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 14:06:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1686995#M52331</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-03-23T14:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Escape sequence in IF condition in Load Script.</title>
      <link>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1687008#M52332</link>
      <description>&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;I am trying to create date field "Calendar Day"&amp;nbsp; into columns as week in Pivot table like shown below -&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;Week 1(2020)&lt;/TD&gt;&lt;TD width="25%"&gt;Week 2(2020)&lt;/TD&gt;&lt;TD width="25%"&gt;Week 3(2020)&lt;/TD&gt;&lt;TD width="25%"&gt;Week 4(2020)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the below condition in front end of scripting its working fine, but that slows down the table when loaded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;if(today() &amp;gt;= [Calendar day] , &lt;STRONG&gt;'Week' &amp;amp;' '&amp;amp;Week([Calendar day]) &amp;amp;'('&amp;amp; Year([Calendar day])&amp;amp;')'&lt;/STRONG&gt; )&lt;/P&gt;&lt;P&gt;So now I want to use this condition in load Script, when I use the above condition in Load script. It appears as -&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Week()&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it sums all week.&lt;/P&gt;&lt;P&gt;So I thought escape sequence can act well in this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 14:27:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1687008#M52332</guid>
      <dc:creator>LP27</dc:creator>
      <dc:date>2020-03-23T14:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Escape sequence in IF condition in Load Script.</title>
      <link>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1687018#M52333</link>
      <description>&lt;P&gt;I am not seeing any issues with your script... is you field [Calendar day] read as date?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 15:00:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1687018#M52333</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-03-23T15:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Escape sequence in IF condition in Load Script.</title>
      <link>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1687291#M52359</link>
      <description>&lt;P&gt;Your correct!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[Calendar day]&amp;nbsp; was not read as Date properly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hence I used this condition&amp;nbsp;-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(today()&amp;gt;=date#("Calendar day",'DD.MM.YYYY'), 'Week' &amp;amp;' '&amp;amp;Week(date#("Calendar day",'DD.MM.YYYY')) &amp;amp;'('&amp;amp; Year(date#("Calendar day",'DD.MM.YYYY'))&amp;amp;')' ) as Week_Cal&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 12:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Escape-sequence-in-IF-condition-in-Load-Script/m-p/1687291#M52359</guid>
      <dc:creator>LP27</dc:creator>
      <dc:date>2020-03-24T12:30:46Z</dc:date>
    </item>
  </channel>
</rss>

