<?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: Variables - check if exists in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variables-check-if-exists/m-p/1153716#M628293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tamil, hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks!! This works perfect!&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/135299_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course I also tried the isnull('$()') solution but unfortunately it doesn`t work;&amp;nbsp; function len(trim('$()') works perfect, Thank you for this perfect solution, it helps soo much,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BG,&lt;/P&gt;&lt;P&gt;Nicole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Aug 2016 12:26:12 GMT</pubDate>
    <dc:creator>nleitgeb</dc:creator>
    <dc:date>2016-08-23T12:26:12Z</dc:date>
    <item>
      <title>Variables - check if exists</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-check-if-exists/m-p/1153713#M628287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Hi there,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;I´ve got some scripts in one QVW and it`s necessary to reload the script parts at different times. The reason is very easy, the raw datas exits at different times, so I can`t reload everything at once.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times New Roman;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #000000;"&gt;At the moment I`ve solved this with variables, that`s a very easy solution. These variables were declared once and setting by button constantly. With an if clause in the script it`s possible to activate /deactivate some parts &lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;(eg. if $(vScriptVariable1)&amp;nbsp; = 1 then [reload script part1…]… else [do nothing…] end if&amp;nbsp; [and start with the next if $(vScriptVariable2)&amp;nbsp; = 1). &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;Actually there are about 20 script parts controlled with this solution. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="mso-fareast-language: DE; color: #000000; font-size: 12pt; mso-ansi-language: EN-US; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;But I`m not absolutely happy with this solution, because it`s possible to delete these variables and I have to declare again (regularly I delete all the variables especially to check correct initialization etc.). On the other hand I don`t like to declare these variable at every reload, because I`d like to know which script parts already done (shown by $( vScriptVariable1) ) = 1).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;So, is there a way to check if a variable exists? (To be clear: I don’t need the value of the variable rather if the variable is declared!) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt;I´ve tried this with isnull($(vScriptVariable1)) &lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;nd with exists(($(vScriptVariable1)) &lt;SPAN style="color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt;but it doesn’t work.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/135267_pastedImage_198.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times New Roman;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;T&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;he variable vTest in the example is just declared in order to show which case (Then or Else) is valid. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;Of course I´ve tried with a deleted vScriptVariable1 and a declared&amp;nbsp; vScriptVariable1. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Any ideas? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Many thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Nicole&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 09:18:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-check-if-exists/m-p/1153713#M628287</guid>
      <dc:creator>nleitgeb</dc:creator>
      <dc:date>2016-08-23T09:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Variables - check if exists</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-check-if-exists/m-p/1153714#M628289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicole,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;If&lt;/STRONG&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Len&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Trim&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;('$(vScriptVariable1)')) = 0 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;Set&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;vTest&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = 'Then';&lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;Else&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;Set&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;vTest&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = 'Else';&lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;End&lt;/STRONG&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;If &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 10:35:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-check-if-exists/m-p/1153714#M628289</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-08-23T10:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variables - check if exists</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-check-if-exists/m-p/1153715#M628291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If IsNull(&lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;'&lt;/SPAN&gt;$(vScriptVariable1)&lt;STRONG style=": ; color: #ff0000; font-size: 14pt;"&gt;'&lt;/STRONG&gt;) then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If Len(Trim(&lt;STRONG style=": ; color: #ff0000; font-size: 14pt;"&gt;'&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;$(vScriptVariable1)&lt;STRONG style=": ; color: #ff0000; font-size: 14pt;"&gt;'&lt;/STRONG&gt;)) = 0 then&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 10:39:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-check-if-exists/m-p/1153715#M628291</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-23T10:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Variables - check if exists</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-check-if-exists/m-p/1153716#M628293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tamil, hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks!! This works perfect!&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/135299_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course I also tried the isnull('$()') solution but unfortunately it doesn`t work;&amp;nbsp; function len(trim('$()') works perfect, Thank you for this perfect solution, it helps soo much,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BG,&lt;/P&gt;&lt;P&gt;Nicole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 12:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-check-if-exists/m-p/1153716#M628293</guid>
      <dc:creator>nleitgeb</dc:creator>
      <dc:date>2016-08-23T12:26:12Z</dc:date>
    </item>
  </channel>
</rss>

