<?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 Set a filter with a script that works in &amp;quot;variable overview&amp;quot; in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-a-filter-with-a-script-that-works-in-quot-variable-overview/m-p/244273#M708228</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;He! He! I found it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just have to replace the SET by the LET to evaluate the formula ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vFiltreCurrentWeek = 'DeclarationDate = {"&amp;gt;=' &amp;amp; chr(36) &amp;amp; '(=Date(DATE_REFERENCE)-6)&amp;lt;=' &amp;amp; chr(36) &amp;amp; '(=Date(DATE_REFERENCE))"}';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Oct 2011 07:26:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-10-13T07:26:39Z</dc:date>
    <item>
      <title>Set a filter with a script that works in "variable overview"</title>
      <link>https://community.qlik.com/t5/QlikView/Set-a-filter-with-a-script-that-works-in-quot-variable-overview/m-p/244272#M708227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm asked to create all the variables in a script instead of using the variable overview of qlikview and what is working in that tool is not working in a script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've the following filter set in the tool:&lt;/P&gt;&lt;P&gt;Variable Name: vFiltreCurrentWeek &lt;/P&gt;&lt;P&gt;Variable Value: DeclarationDate = {"&amp;gt;=$(=Date(DATE_REFERENCE)-6)&amp;lt;=$(=Date(DATE_REFERENCE))"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i'm try to create that variable with a script, i've an internal error:&lt;/P&gt;&lt;P&gt;DeclarationDate = {"&amp;gt;=(internal error)&amp;lt;=(internal error)"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script i'm using is:&lt;/P&gt;&lt;P&gt;SET vFiltreCurrentWeek = 'DeclarationDate = {"&amp;gt;=$(=Date(DATE_REFERENCE)-6)&amp;lt;=$(=Date(DATE_REFERENCE))"}';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that the $ aims to evaluate what is in the () so i tried to replace it by chr(36):&lt;/P&gt;&lt;P&gt;SET vFiltreCurrentWeek = 'DeclarationDate = {"&amp;gt;=' &amp;amp; chr(36) &amp;amp; '$(=Date(DATE_REFERENCE)-6)&amp;lt;=' &amp;amp; chr(36) &amp;amp; '$(=Date(DATE_REFERENCE))"}';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And quite have the same result:&lt;/P&gt;&lt;P&gt;'DeclarationDate = {"&amp;gt;=' &amp;amp; chr(36) &amp;amp; '(internal error)&amp;lt;=' &amp;amp; chr(36) &amp;amp; '(internal error)"}'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Idea.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 06:38:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-a-filter-with-a-script-that-works-in-quot-variable-overview/m-p/244272#M708227</guid>
      <dc:creator />
      <dc:date>2011-10-13T06:38:26Z</dc:date>
    </item>
    <item>
      <title>Set a filter with a script that works in "variable overview"</title>
      <link>https://community.qlik.com/t5/QlikView/Set-a-filter-with-a-script-that-works-in-quot-variable-overview/m-p/244273#M708228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;He! He! I found it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just have to replace the SET by the LET to evaluate the formula ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vFiltreCurrentWeek = 'DeclarationDate = {"&amp;gt;=' &amp;amp; chr(36) &amp;amp; '(=Date(DATE_REFERENCE)-6)&amp;lt;=' &amp;amp; chr(36) &amp;amp; '(=Date(DATE_REFERENCE))"}';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 07:26:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-a-filter-with-a-script-that-works-in-quot-variable-overview/m-p/244273#M708228</guid>
      <dc:creator />
      <dc:date>2011-10-13T07:26:39Z</dc:date>
    </item>
  </channel>
</rss>

