Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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,
I never use macros, can you show me how to display the input box for end date then trigger the reload? tnx
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!
try INPUT function in load script.
Alex
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.
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.
It's very helpful... Thanks shubhu007