<?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: Creating variables in the load script containing '=' in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936476#M323255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks henric, out of all of these I think this is the easiest option (I have a good few variables written already so this should be easy to do via find and replace)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Oct 2015 13:27:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-10-08T13:27:58Z</dc:date>
    <item>
      <title>Creating variables in the load script containing '='</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936467#M323246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a large amount of variables I wish to define in the load script. I have done so like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Rank Retrieval&lt;/P&gt;&lt;P&gt;//Full Sales Force&lt;/P&gt;&lt;P&gt;SET vCalculateDayTakenRank=Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.DayTakenRank);&lt;/P&gt;&lt;P&gt;SET vCalculateWeekTakenRank=Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.WeekTakenRank);&lt;/P&gt;&lt;P&gt;SET vCalculateLastWeekTakenRank=Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.LastWeekTakenRank);&lt;/P&gt;&lt;P&gt;SET vCalculateMonthTakenRank=Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.MonthTakenRank);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;followed by many more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These variables work when added one by one in variable overview.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/101392_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the load script I cannot add the = required to initialise the code.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have chosen to define them in my load script because of the large number and because I need to copy this structure into a number of other applications.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Things that I have tried so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vCalculateDayTakenRank==Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.DayTakenRank);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vCalculateDayTakenRank='=Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.DayTakenRank)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vCalculateDayTakenRank=[=Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.DayTakenRank)];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vCalculateDayTakenRank="=Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.DayTakenRank)";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vCalculateDayTakenRank="'=Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.DayTakenRank)'";&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 11:12:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936467#M323246</guid>
      <dc:creator />
      <dc:date>2015-10-08T11:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variables in the load script containing '='</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936468#M323247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try LET instead of SET when you use delimiters for the string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 13:01:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936468#M323247</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-10-08T13:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variables in the load script containing '='</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936469#M323248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this force the variable to contain a static value upon reload?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to be able to calculate the result whenever I call the variable because SalesRep is not a static selection&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 13:04:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936469#M323248</guid>
      <dc:creator />
      <dc:date>2015-10-08T13:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variables in the load script containing '='</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936470#M323249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua, I used your double quotes option and seems worked:&lt;/P&gt;&lt;P&gt;From:&lt;/P&gt;&lt;P&gt;SET vCalculateDayTakenRank="=Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.DayTakenRank)";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Created this variable:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/101430_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 13:05:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936470#M323249</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-10-08T13:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variables in the load script containing '='</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936471#M323250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sum of your tried options should work. Like:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SET vCalculateDayTakenRank='=Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.DayTakenRank)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;seems to be fine. Try&lt;STRONG&gt; =&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;vCalculateDayTakenRank&lt;/STRONG&gt; in a text box. Doesn't it give your expected output? Could you post a sample qvw that shows the issue you are talking about?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 13:06:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936471#M323250</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-10-08T13:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variables in the load script containing '='</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936472#M323251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set should work just as well. Try&lt;/P&gt;&lt;P&gt;SET vCalculateDayTakenRank = =Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.DayTakenRank);&lt;/P&gt;&lt;P&gt;with a space between the two equals signs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 13:06:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936472#M323251</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-10-08T13:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variables in the load script containing '='</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936473#M323252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Set works fine, I use it all the time, but you need a space between the two = sign.&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;SET vCalculateDayTakenRank= =Only({$&amp;lt;SalesRep&amp;gt;}LineHistory_TakenRanking.DayTakenRank);&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 13:08:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936473#M323252</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-10-08T13:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variables in the load script containing '='</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936474#M323253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your method and it did indeed work this time. Perhaps I had not tried double quotes properly. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 13:26:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936474#M323253</guid>
      <dc:creator />
      <dc:date>2015-10-08T13:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variables in the load script containing '='</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936475#M323254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It was returning a null in my sample text box when an integer was expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I may have accidentally forgot to reset the SalesRep selection upon reload though &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 13:26:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936475#M323254</guid>
      <dc:creator />
      <dc:date>2015-10-08T13:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variables in the load script containing '='</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936476#M323255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks henric, out of all of these I think this is the easiest option (I have a good few variables written already so this should be easy to do via find and replace)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 13:27:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variables-in-the-load-script-containing/m-p/936476#M323255</guid>
      <dc:creator />
      <dc:date>2015-10-08T13:27:58Z</dc:date>
    </item>
  </channel>
</rss>

