<?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 VBScript function calls from script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/VBScript-function-calls-from-script/m-p/149573#M27737</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In QV, VBScript function calls from script it throws an error called "File not found &amp;lt;--=&amp;gt;" .&lt;/P&gt;&lt;P&gt;I am trying the following code.&lt;/P&gt;&lt;P&gt;dim flag&lt;BR /&gt;&lt;BR /&gt;function VBin(prompt)&lt;BR /&gt;VBin=inputbox(prompt)&lt;BR /&gt;end function&lt;BR /&gt;&lt;BR /&gt;function VBclearFlag()&lt;BR /&gt;flag=0&lt;BR /&gt;end function&lt;BR /&gt;&lt;BR /&gt;function VBrelPos(Ref, Current)&lt;BR /&gt;if Ref=Current then&lt;BR /&gt;VBRelPos="Reference"&lt;BR /&gt;flag=1&lt;BR /&gt;elseif flag=0 then&lt;BR /&gt;VBRelPos="Before "&amp;amp;Ref&amp;amp;" in table"&lt;BR /&gt;else&lt;BR /&gt;VBRelPos="After "&amp;amp;Ref&amp;amp;" in table"&lt;BR /&gt;end if&lt;BR /&gt;end function&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Script Module&lt;/P&gt;&lt;P&gt;let MaxPop=VBin('Max population in millions :');&lt;BR /&gt;let RefCountry=VBin('Reference country :');&lt;BR /&gt;let dummy=VBclearFlag();&lt;BR /&gt;Load&lt;BR /&gt;Country,recno(),&lt;BR /&gt;Capital,&lt;BR /&gt;"Area(km.sq)",&lt;BR /&gt;"Population(mio)",&lt;BR /&gt;VBrelPos('$(RefCountry)',Country) as RelativePos&lt;BR /&gt;from country1.csv (ansi, txt, delimiter is ',', embedded labels)&lt;BR /&gt;where "Population(mio)" &amp;lt;= $(MaxPop);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Murugavel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jul 2009 13:15:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-17T13:15:07Z</dc:date>
    <item>
      <title>VBScript function calls from script</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-function-calls-from-script/m-p/149573#M27737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In QV, VBScript function calls from script it throws an error called "File not found &amp;lt;--=&amp;gt;" .&lt;/P&gt;&lt;P&gt;I am trying the following code.&lt;/P&gt;&lt;P&gt;dim flag&lt;BR /&gt;&lt;BR /&gt;function VBin(prompt)&lt;BR /&gt;VBin=inputbox(prompt)&lt;BR /&gt;end function&lt;BR /&gt;&lt;BR /&gt;function VBclearFlag()&lt;BR /&gt;flag=0&lt;BR /&gt;end function&lt;BR /&gt;&lt;BR /&gt;function VBrelPos(Ref, Current)&lt;BR /&gt;if Ref=Current then&lt;BR /&gt;VBRelPos="Reference"&lt;BR /&gt;flag=1&lt;BR /&gt;elseif flag=0 then&lt;BR /&gt;VBRelPos="Before "&amp;amp;Ref&amp;amp;" in table"&lt;BR /&gt;else&lt;BR /&gt;VBRelPos="After "&amp;amp;Ref&amp;amp;" in table"&lt;BR /&gt;end if&lt;BR /&gt;end function&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Script Module&lt;/P&gt;&lt;P&gt;let MaxPop=VBin('Max population in millions :');&lt;BR /&gt;let RefCountry=VBin('Reference country :');&lt;BR /&gt;let dummy=VBclearFlag();&lt;BR /&gt;Load&lt;BR /&gt;Country,recno(),&lt;BR /&gt;Capital,&lt;BR /&gt;"Area(km.sq)",&lt;BR /&gt;"Population(mio)",&lt;BR /&gt;VBrelPos('$(RefCountry)',Country) as RelativePos&lt;BR /&gt;from country1.csv (ansi, txt, delimiter is ',', embedded labels)&lt;BR /&gt;where "Population(mio)" &amp;lt;= $(MaxPop);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Murugavel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 13:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-function-calls-from-script/m-p/149573#M27737</guid>
      <dc:creator />
      <dc:date>2009-07-17T13:15:07Z</dc:date>
    </item>
  </channel>
</rss>

