<?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: Set variable to field value in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500045#M186849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems correct. I would try to enclose the variable between quotes or brackets because there is a space (special character):&lt;/P&gt;&lt;P&gt;BudgetType = {[$(Current_FC)] }&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Dec 2013 12:54:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-12-03T12:54:37Z</dc:date>
    <item>
      <title>Set variable to field value in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500037#M186841</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 anyone that could explain how I could set av varibale in my load script (SET Current_FC = BudgetType=('FC2 2013');) and then use the variable in a set analysis like: &lt;/P&gt;&lt;P&gt;sum({$&amp;lt;PeriodCounter={"$(#=max(PeriodCounter-1))"}, $(Current_FC) ,Cost_Center_ID-={'10600'}&amp;gt;} BudgetAmount) *-1/1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 13:41:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500037#M186841</guid>
      <dc:creator />
      <dc:date>2013-11-27T13:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to field value in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500038#M186842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; maybe this post could help you &lt;A href="https://community.qlik.com/message/357969"&gt;Setting a variable in script...&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 15:30:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500038#M186842</guid>
      <dc:creator>bbi_mba_76</dc:creator>
      <dc:date>2013-11-27T15:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to field value in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500039#M186843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May this &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/11/18/dollar-expansions"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/18/dollar-expansions&lt;/A&gt; can solve your problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 15:43:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500039#M186843</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-11-27T15:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to field value in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500040#M186844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reply. Unfortunately I did'nt find anything that solve my problem...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Nov 2013 09:42:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500040#M186844</guid>
      <dc:creator />
      <dc:date>2013-11-29T09:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to field value in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500041#M186845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reply. Unfortunately I did'nt find anything that solve my problem...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Nov 2013 09:43:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500041#M186845</guid>
      <dc:creator />
      <dc:date>2013-11-29T09:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to field value in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500042#M186846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would change a little the sentence for setting the variable:&lt;/P&gt;&lt;P&gt;SET Current_FC = BudgetType=&lt;STRONG&gt;{&lt;/STRONG&gt;'FC2 2013'&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use curly brackets. In fact your variable should contain a true part of the set analysis syntax&lt;/P&gt;&lt;P&gt;Perhaps, also, use quotes: set Current_FC = "xxxx";&amp;nbsp; (due to the = sign in your text also)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fabrice&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Nov 2013 09:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500042#M186846</guid>
      <dc:creator />
      <dc:date>2013-11-29T09:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to field value in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500043#M186847</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;Check this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/357969#357969"&gt;http://community.qlik.com/message/357969#357969&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/370872#370872"&gt;http://community.qlik.com/message/370872#370872&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravikant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Nov 2013 09:54:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500043#M186847</guid>
      <dc:creator />
      <dc:date>2013-11-29T09:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to field value in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500044#M186848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I get the right value (&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;BudgetType={'FC2 2013'}&lt;/SPAN&gt;) for the variable if I look in the Variable Overview...&lt;/P&gt;&lt;P&gt;But i don't get the calculation right the I have the expression like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;PeriodCounter={"$(#=max(PeriodCounter-1))"}, BudgetType={$(Current_FC)} ,Cost_Center_ID-={'10600'}&amp;gt;} BudgetAmount) *-1/1000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Any suggestions?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 12:42:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500044#M186848</guid>
      <dc:creator />
      <dc:date>2013-12-03T12:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to field value in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500045#M186849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems correct. I would try to enclose the variable between quotes or brackets because there is a space (special character):&lt;/P&gt;&lt;P&gt;BudgetType = {[$(Current_FC)] }&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 12:54:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500045#M186849</guid>
      <dc:creator />
      <dc:date>2013-12-03T12:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to field value in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500046#M186850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reply! But it still doesn't work, I only get 0. Do you have any other suggestions?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 14:00:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500046#M186850</guid>
      <dc:creator />
      <dc:date>2013-12-09T14:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to field value in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500047#M186851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you tried just SET Current_FC = 'FC2 2013';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because with &lt;STRONG&gt;{&lt;/STRONG&gt;'FC2 2013'&lt;STRONG&gt;}&lt;/STRONG&gt; you have double brackets &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;BudgetType={&lt;STRONG&gt;{&lt;/STRONG&gt;'FC2 2013'&lt;STRONG&gt;}&lt;/STRONG&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;or try &lt;BR /&gt;SET Current_FC = FC2 2013;&lt;/P&gt;&lt;P&gt;and then &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;BudgetType=&lt;/SPAN&gt;{'$(Current_FC)'}&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 14:16:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500047#M186851</guid>
      <dc:creator>karolina_</dc:creator>
      <dc:date>2013-12-09T14:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to field value in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500048#M186852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply en the solution thats works for me is:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;In the script - &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SET Current_FC = 'FC2 2013';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In the expression - BudgetType={[$(Current_BC)]}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 09:56:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-field-value-in-load-script/m-p/500048#M186852</guid>
      <dc:creator />
      <dc:date>2013-12-13T09:56:26Z</dc:date>
    </item>
  </channel>
</rss>

