<?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 - define in script without error? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821723#M289689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DataNibbler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set var = "= 'BS_' &amp;amp; &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Monat_Jahr_Staplerkosten&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;- Marcus&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Feb 2015 13:12:56 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2015-02-17T13:12:56Z</dc:date>
    <item>
      <title>Variables - define in script without error?</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821722#M289688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have come to the point of trying to define all variables that I need in the script, none on the GUI. That way I can avoid deleting them by mistake in the course of a cleanup - I try to delete variables either at the beginning or at the end of my script and sometimes, I just look through the variable_manager and delete them manually just to be sure that when I see a particular one, it has just been recreated in the script.&lt;/P&gt;&lt;P&gt;Now I have two variables in my current app that contain a GETFIELDSELECTIONS() function - so when I define them in the script, I get an error_message of course.&lt;/P&gt;&lt;P&gt;I cán of course define them on the GUI and just comment out the commands to define them in the script so as to have it as a backup, just in case, but I wonder:&lt;/P&gt;&lt;P&gt;´&lt;/P&gt;&lt;P&gt;=&amp;gt; Is it possible to define these variables in the script without triggering an error? I will post them here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= 'BS_' &amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Monat_Jahr_Staplerkosten&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 13:06:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821722#M289688</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-02-17T13:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Variables - define in script without error?</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821723#M289689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DataNibbler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set var = "= 'BS_' &amp;amp; &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Monat_Jahr_Staplerkosten&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;- Marcus&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 13:12:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821723#M289689</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-02-17T13:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Variables - define in script without error?</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821724#M289690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Data,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to use SET rather than LET for variables like that&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;SET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;v &lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= 'BS_' &amp;amp;GetFieldSelections(Monat_Jahr_Staplerkosten) ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;will work fine&lt;/P&gt;&lt;P&gt;Or if globally evaluated&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;SET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;v &lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;= ='BS_' &amp;amp;GetFieldSelections(Monat_Jahr_Staplerkosten) ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 13:13:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821724#M289690</guid>
      <dc:creator />
      <dc:date>2015-02-17T13:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Variables - define in script without error?</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821725#M289691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you can actually combine double_quotes and single quotes?&lt;/P&gt;&lt;P&gt;I didn't think you could.&lt;/P&gt;&lt;P&gt;I'll try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 13:20:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821725#M289691</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-02-17T13:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Variables - define in script without error?</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821726#M289692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your suggestion works - almost. I need another '=' so the variable will get evaluated on the GUI and not just treated as text ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 13:24:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821726#M289692</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-02-17T13:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Variables - define in script without error?</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821727#M289693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you used a set-statement you could combine these because there isn't any evaluation - it would be taken as it is and therefore the leading "=" inside the statement to reach a evaluation inside the gui.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 13:32:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821727#M289693</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-02-17T13:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Variables - define in script without error?</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821728#M289694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yea the second option does that for you, one thing I would add is, even with the SET statement $ is still expanded. So if you have more complex variables you need defined like this that need a $ in them, you'll need to use the right chr in a let statement, or do some build and replace on variables potentially.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 13:38:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-define-in-script-without-error/m-p/821728#M289694</guid>
      <dc:creator />
      <dc:date>2015-02-17T13:38:45Z</dc:date>
    </item>
  </channel>
</rss>

