Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

VBScript function calls from script

Hi,

In QV, VBScript function calls from script it throws an error called "File not found <--=>" .

I am trying the following code.

dim flag

function VBin(prompt)
VBin=inputbox(prompt)
end function

function VBclearFlag()
flag=0
end function

function VBrelPos(Ref, Current)
if Ref=Current then
VBRelPos="Reference"
flag=1
elseif flag=0 then
VBRelPos="Before "&Ref&" in table"
else
VBRelPos="After "&Ref&" in table"
end if
end function

Script Module

let MaxPop=VBin('Max population in millions :');
let RefCountry=VBin('Reference country :');
let dummy=VBclearFlag();
Load
Country,recno(),
Capital,
"Area(km.sq)",
"Population(mio)",
VBrelPos('$(RefCountry)',Country) as RelativePos
from country1.csv (ansi, txt, delimiter is ',', embedded labels)
where "Population(mio)" <= $(MaxPop);

Thanks,

Murugavel

0 Replies