<?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: pass parameter from load script to macro function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/pass-parameter-from-load-script-to-macro-function/m-p/301302#M111541</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;It seems to be working for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the attached qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you send a sample qvw?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2012 19:50:58 GMT</pubDate>
    <dc:creator>fosuzuki</dc:creator>
    <dc:date>2012-07-31T19:50:58Z</dc:date>
    <item>
      <title>pass parameter from load script to macro function</title>
      <link>https://community.qlik.com/t5/QlikView/pass-parameter-from-load-script-to-macro-function/m-p/301301#M111540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;hi&lt;/DIV&gt;&lt;DIV&gt; i am trying to pass parameters from scrip (inside load statment) to macro function and i can't get the return parameter.&lt;/DIV&gt;&lt;DIV&gt; the parameters are array like '1,2,3,4,' and '100,0,20,0,' and '10'&lt;/DIV&gt;&lt;DIV&gt; my load scrip:&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;DIV&gt;Result:&lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;key&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;Get_num_in_array&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MrpKeyArray&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;QtyDemandArray&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;QtySuplly&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;Demand_Supply_Key&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; mrp ; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; my function:&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;function Get_num_in_array(MrpKeyArray,QtyDemandArray,QtySuplly) &lt;BR /&gt;a=split(QtyDemandArray,",")&lt;BR /&gt;b=QtySuplly&lt;BR /&gt;c=split(MrpKeyArray,",")&lt;BR /&gt;&lt;BR /&gt;For x=0 to UBound(a)-1&lt;BR /&gt;if QtySuplly =&amp;gt; a(x) then&lt;BR /&gt;QtySuplly = QtySuplly - a(x)&lt;BR /&gt;ResultDemandQty = ResultDemandQty &amp;amp; a(x)&amp;nbsp; &amp;amp; ","&lt;BR /&gt;resultDemandKey = resultDemandKey &amp;amp; c(x)&amp;nbsp; &amp;amp; ","&lt;BR /&gt;else&lt;BR /&gt;ResultDemandQty =ResultDemandQty &amp;amp; QtySuplly&amp;nbsp; &amp;amp; ","&lt;BR /&gt;resultDemandKey = resultDemandKey &amp;amp; c(x) &amp;amp; ","&lt;BR /&gt;end if&lt;BR /&gt;next&lt;BR /&gt;Get_num_in_array = resultDemandKey &amp;amp; ResultDemandQty &lt;BR /&gt;End function&lt;/P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;plaese help me.&lt;/P&gt;&lt;P&gt; Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 19:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pass-parameter-from-load-script-to-macro-function/m-p/301301#M111540</guid>
      <dc:creator />
      <dc:date>2011-12-14T19:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: pass parameter from load script to macro function</title>
      <link>https://community.qlik.com/t5/QlikView/pass-parameter-from-load-script-to-macro-function/m-p/301302#M111541</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;It seems to be working for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the attached qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you send a sample qvw?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 19:50:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pass-parameter-from-load-script-to-macro-function/m-p/301302#M111541</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2012-07-31T19:50:58Z</dc:date>
    </item>
  </channel>
</rss>

