Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
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

Tags (2)
1 Solution

Accepted Solutions
Not applicable

Prompt for parameters before loading...

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

7 Replies
vgutkovsky
Honored Contributor II

Prompt for parameters before loading...

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

Prompt for parameters before loading...

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

vgutkovsky
Honored Contributor II

Prompt for parameters before loading...

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

Prompt for parameters before loading...

try INPUT function in load script.

Alex

vgutkovsky
Honored Contributor II

Prompt for parameters before loading...

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

Prompt for parameters before loading...

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

Prompt for parameters before loading...

It's very helpful... Thanks shubhu007