<?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: passing variable value in script editor in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/passing-variable-value-in-script-editor/m-p/604556#M1101650</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its new to me can u help me with the syntax?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;pRAJNA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Apr 2014 14:27:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-04-22T14:27:20Z</dc:date>
    <item>
      <title>passing variable value in script editor</title>
      <link>https://community.qlik.com/t5/QlikView/passing-variable-value-in-script-editor/m-p/604554#M1101648</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;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; SELECT &lt;BR /&gt;&lt;BR /&gt;FK_EXT_Bank_Id as PositionBank,"LEBT_Net_Tovr_Loc" as MainBalanceAmount,LEBT_Date &lt;BR /&gt;&lt;BR /&gt;FROM&amp;nbsp; dbo."LED_BAL_TURNOVER"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;I used the below logic to get missing data&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;MinMaxDate:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Min&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LEBT_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MinDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LEBT_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MaxDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; TempTable_Rates;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vMinDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('MinDate',-1,'MinMaxDate') - 1;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vMaxDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('MaxDate',-1,'MinMaxDate') ;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Drop&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; MinMaxDate;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Join&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (TempTable_Rates)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;recno&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()+&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vMinDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LEBT_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Autogenerate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;vMaxDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; - &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;vMinDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;Rates:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NoConcatenate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LEBT_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MainBalanceAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ), &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MainBalanceAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MainBalanceAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MainBalanceAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; TempTable_Rates&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Order&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;By&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LEBT_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;// so that above values can be propagated downwards&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Drop&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; TempTable_Rates;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;But the problem is em not getting all dates for other banks.To get that i added a one more column&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PositionBank&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ), &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PositionBank&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PositionBank&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PositionBank &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;and added a filter in code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; SELECT &lt;BR /&gt;&lt;BR /&gt;FK_EXT_Bank_Id as PositionBank,"LEBT_Net_Tovr_Loc" as MainBalanceAmount,LEBT_Date &lt;BR /&gt;&lt;BR /&gt;FROM&amp;nbsp; dbo."LED_BAL_TURNOVER"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #808080; font-size: 8pt;"&gt;where FK_EXT_Bank_Id&lt;/SPAN&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt; = $(v_bank)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;now i get correct value on setting the value t0 specific value=1080&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;but i want to variable value to be chnaged on every selection on bank&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;how to avchieve this? if i reload em getting it....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Prajna&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 13:04:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/passing-variable-value-in-script-editor/m-p/604554#M1101648</guid>
      <dc:creator />
      <dc:date>2014-04-22T13:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable value in script editor</title>
      <link>https://community.qlik.com/t5/QlikView/passing-variable-value-in-script-editor/m-p/604555#M1101649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about the For each syntax around the main data ....?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put your Select statement into a sub-routine called LoadBankData&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub LoadBankData()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select statement from above goes in here&lt;/P&gt;&lt;P&gt;Endsub;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enter the following in your script and it will go through Bank1 and Bank2 in turn:&lt;/P&gt;&lt;P&gt;(You could put the 'Bank1','Bank2' into a variable if required)&lt;/P&gt;&lt;P&gt;For each bank in 'Bank1', 'Bank2'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call LoadBankData()&lt;/P&gt;&lt;P&gt;Next bank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 14:22:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/passing-variable-value-in-script-editor/m-p/604555#M1101649</guid>
      <dc:creator>Roop</dc:creator>
      <dc:date>2014-04-22T14:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable value in script editor</title>
      <link>https://community.qlik.com/t5/QlikView/passing-variable-value-in-script-editor/m-p/604556#M1101650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its new to me can u help me with the syntax?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;pRAJNA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 14:27:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/passing-variable-value-in-script-editor/m-p/604556#M1101650</guid>
      <dc:creator />
      <dc:date>2014-04-22T14:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable value in script editor</title>
      <link>https://community.qlik.com/t5/QlikView/passing-variable-value-in-script-editor/m-p/604557#M1101651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What fields are variable against the bank - I think that perhaps I have given the wrong advice ...... I think that you should be able to load a series of values against any bank and then link those to the bank IDs themselves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look at the Mapping Load syntax (which is identical to the load command, but for 1 field to lookup against) such as Bank ID and another lookup measure.&lt;/P&gt;&lt;P&gt;This can then be used by the ApplyMap('ApplyMapName', Field, DefaultValue) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would give you the variability that you are seeking.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 15:00:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/passing-variable-value-in-script-editor/m-p/604557#M1101651</guid>
      <dc:creator>Roop</dc:creator>
      <dc:date>2014-04-22T15:00:59Z</dc:date>
    </item>
  </channel>
</rss>

