Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

VBScript inputbox() function not calling from Qlikview script.

Hi, I am trying to implement below code according to Qlikview Reference manual. First i received the error for "file not found" for that i have created country1.csv file in the same folder where i have my .qvw. Now trying to run the application but not getting prompt for max population and ref country.

If i try to give hard coded value in VBin function say VBin12=30000000 i get the data filter accordingly and display in the table box object.

I can call the VBscript function from Qlikview script but not able to display the inputbox() of VBscript. (ref function VBin(prompt) below)

It will be great if anyone help me out with this.

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);

1 Reply
stephencredmond
Luminary Alumni
Luminary Alumni

If you really must have input like this, use the Input function:

Load

Country,recno(),

Capital,

"Area(km.sq)",

"Population(mio)"

from country1.csv (ansi, txt, delimiter is ',', embedded labels)

where "Population(mio)" <= Input('Max population in millions :');

But consider wider implications - this won't work on a server implementation.

Regards,

Stephen