<?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: Delete variables in loading scripts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456318#M697763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;VarName =;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;VarName = null();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Mar 2013 15:53:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-03-19T15:53:05Z</dc:date>
    <item>
      <title>Delete variables in loading scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456317#M697762</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;Is there a way to do the same thing than the following macro by the very beginning of the loading script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sub cleanVariables&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set VariableCollection = ActiveDocument.GetVariableDescriptions&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For i = 0 to VariableCollection.Count - 1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set tempVar = VariableCollection.Item(i)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tempVarName = tempVar.Name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.RemoveVariable tempVarName&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;BR /&gt;End sub &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;﻿The idea is to flush the application from every variable when the reload button is engaged.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks in advance. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 15:51:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456317#M697762</guid>
      <dc:creator />
      <dc:date>2013-03-19T15:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Delete variables in loading scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456318#M697763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;VarName =;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;VarName = null();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 15:53:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456318#M697763</guid>
      <dc:creator />
      <dc:date>2013-03-19T15:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Delete variables in loading scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456319#M697764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ricardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will flush a known variable, but will not do the same thing than the macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro is looking for any existing variable in the document then remove it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 15:55:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456319#M697764</guid>
      <dc:creator />
      <dc:date>2013-03-19T15:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Delete variables in loading scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456320#M697765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the commands above to delete the temp variables in loading script (QV 11.0 SR2). The values of the variables will be deleted, but the empty variables stay in the Variable Overview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a datamart and the variables will be not used in frontend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I delete the variables in Variable Overview with loading script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 09:59:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456320#M697765</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-21T09:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Delete variables in loading scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456321#M697766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the following conditions are met, the variable will not persist into the front end:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The variable does not exist before the reload (in other words it is created by the load script)&lt;/LI&gt;&lt;LI&gt;The variable is set to null before the load script is terminated (eg Set vVar=; )&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 10:03:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456321#M697766</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-05-21T10:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Delete variables in loading scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456322#M697767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, if the script runs some times variables exist already. This sentence was helpfull:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"The variable does not exist before the reload (in other words it is created by the load script)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 10:16:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456322#M697767</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-21T10:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Delete variables in loading scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456323#M697768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In any case, you need to (eg)&amp;nbsp; set vVar=;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this leads me to another possible situation: suppose you create the variable declaring it on the script but forget to assign the empty value and after loading and using the frontend, you save the document, storing the variable into it. In this case, I think, whether you insert the [ set vVar=; ] statement in the script, you ought to delete it from the document using the Document Property window.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 15:37:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456323#M697768</guid>
      <dc:creator>bimartingo</dc:creator>
      <dc:date>2014-11-21T15:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Delete variables in loading scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456324#M697769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are correct Martin. You created variable in the script and refresh the app. So you can see the the variable on the Variable window (Ctrl+Alt+v). If you delete the variable from application, you need to assign null or nothing in the script. If the variables already on UI, you shouldd have to delete from UI as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 20:07:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456324#M697769</guid>
      <dc:creator />
      <dc:date>2014-11-21T20:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Delete variables in loading scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456325#M697770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my script that dont creates variables in Application after script ends. Try it in your case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now = Now();&lt;/P&gt;&lt;P&gt;ReloadTime = ReloadTime();&lt;/P&gt;&lt;P&gt;DocumentPath = DocumentPath();&lt;/P&gt;&lt;P&gt;DocumentTitle = DocumentTitle();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AppPath, AppReloadTime, AppDocumentPath, AppDocumentName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(QvWorkPath), $(Now), $(ReloadTime), $(DocumentPath), $(DocumentTitle)];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now = Null();&lt;/P&gt;&lt;P&gt;ReloadTime = Null();&lt;/P&gt;&lt;P&gt;DocumentPath = Null();&lt;/P&gt;&lt;P&gt;DocumentTitle = Null();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 08:55:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Delete-variables-in-loading-scripts/m-p/456325#M697770</guid>
      <dc:creator>stantrolav</dc:creator>
      <dc:date>2015-04-30T08:55:19Z</dc:date>
    </item>
  </channel>
</rss>

