<?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: Variable in Scripts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453422#M701539</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the complete script? Does the filed Num_Month exists in your excel file?&lt;/P&gt;&lt;P&gt;Actually, the function GetFieldSelections() is not available to be used in the script, so if you use GetFieldSelections() to set the variable in the script it won't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Sep 2012 13:59:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-09-28T13:59:58Z</dc:date>
    <item>
      <title>Variable in Scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453418#M701534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp; have created a variable in back end like &lt;/P&gt;&lt;P&gt;Let _Var = '=GetFieldSelections(Num_Month)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to use it in my Load statement for example like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;Num_Month,&lt;/P&gt;&lt;P&gt;if($(_Var) = Num_Month,'Match','Not Match') as _Status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Excel........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i&amp;nbsp; am not getting the desired result .....????&lt;/P&gt;&lt;P&gt;Is it possble to use it like this ..........???&lt;/P&gt;&lt;P&gt;please help &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 13:40:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453418#M701534</guid>
      <dc:creator />
      <dc:date>2012-09-28T13:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453419#M701536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi manish05,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use a variable, you have tu put it into $(), in your exemple:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;Num_Month,&lt;/P&gt;&lt;P&gt;if( $(_Var) = Num_Month,'Match','Not Match') as _Status &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but as you have initialized your variable before the load, I suppose you the condition you want is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if( Num_Month= $(_Var),'Match','Not Match') as _Status &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 13:45:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453419#M701536</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-28T13:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453420#M701537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still Not working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 13:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453420#M701537</guid>
      <dc:creator />
      <dc:date>2012-09-28T13:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453421#M701538</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;Using a Let statement produces a string. So the variable expands to the string. Change that to a set without the quotes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set _Var = =GetFieldSelections(Num_Month);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(the double = signs are not a typo!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will produce a variable whose value is the field selection. I that what you are expecting?&lt;/P&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>Fri, 28 Sep 2012 13:59:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453421#M701538</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-09-28T13:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453422#M701539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the complete script? Does the filed Num_Month exists in your excel file?&lt;/P&gt;&lt;P&gt;Actually, the function GetFieldSelections() is not available to be used in the script, so if you use GetFieldSelections() to set the variable in the script it won't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 13:59:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453422#M701539</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-28T13:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453423#M701540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But that will not produce useful value when used here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If($(_Var) = Num_Month,'Match','Not Match') as _Status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are you trying to compare with Num_Month?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS and bobbyraj is right, GetFieldSelections does not work in script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 14:01:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453423#M701540</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-09-28T14:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453424#M701541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But when i am using _Var in front end in the Text Obejct it is giving me the correct result , then why i can not use it in back end just below few lines after declaring the variable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 14:16:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Scripts/m-p/453424#M701541</guid>
      <dc:creator />
      <dc:date>2012-09-28T14:16:02Z</dc:date>
    </item>
  </channel>
</rss>

