Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Prompt for parameters before loading...

Hi,

Is it possible to ask for parameters before loading data from sources?

like before loading the QV should ask for Ending Date (for field Post Date) then use it to load the data up to whaterver value is entered by the user and not the to date data.

Best Regads,

Marson

1 Solution

Accepted Solutions
Not applicable
Author

Hey use this.

input() function.....

In your script :-

LET v = input(' Enter value ', ' Dialog name ');

TableName:

LOAD

RECNO() as A,

RAND() as B AUTOGENERATE($(v));


When you reload your script it will ask for a value and assign that value to v. Geeked

View solution in original post

7 Replies
vgutkovsky
Master II
Master II

Well....kind of. What I like to do in these situations is use macros to output the End Date variable to a text file and then trigger a reload. Then the script would read in the text file as an Include.

Regards,

Not applicable
Author

I never use macros, can you show me how to display the input box for end date then trigger the reload? tnx

vgutkovsky
Master II
Master II

I'm sure you can figure out how to put in an input box--just the standard way. For the macro, you would first need to use Windows file writing routines that can be used from all VBScripts. So it would start off like this:


DIM sFile
sFile = "mytextfile.txt"
Set fileoutput = CreateObject("Scripting.FileSystemObject")
Set oFile = fileoutput.CreateTextFile(sFile,true)


Then you would write your lines to the text file by checking variable values, etc. At the end, you would write ActiveDocument.Reload. In the script, you would click Edit --> Include and select the text file you created above. Sorry, but I don't really have time to write all the lines of code for you; if you need more help, check the API Guide in the Documentation folder.

Good luck!

Not applicable
Author

try INPUT function in load script.

Alex

vgutkovsky
Master II
Master II

Alex,

I was assuming INPUT won't work for Marson since the reload is happening server-side and the users won't see the script. If the reload is local, however, that's a good idea.

Not applicable
Author

Hey use this.

input() function.....

In your script :-

LET v = input(' Enter value ', ' Dialog name ');

TableName:

LOAD

RECNO() as A,

RAND() as B AUTOGENERATE($(v));


When you reload your script it will ask for a value and assign that value to v. Geeked

Not applicable
Author

It's very helpful... Thanks shubhu007