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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

User input and servers

I have a number of reports where the user is asked to input start and end dates. We have moved those on to our server, but quickly found that the reports did not refresh - when faced with

Let vStartDate = Input('Enter Start Date (MM/DD/YYYY)', 'Input required');

The server just hangs. It was enough to default this to the previous month's start, but it does take away some flexibility from the user.

I was wondering if there was a way to implement something like this (metacode)

Let vStartDate =Input('Enter StartDate')

Wait (30 seconds)

If vStartDate is null then vStartdate = MonthStart(today(),-1)

This gives the user a chance to respond but also accomodates a server environment. Not sure if this functionality exists

in QV though. Does anyone know?

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you're using Publisher you can add a parameter to the reload task. In the qlikview document you can use this parameter to decide if you have to show the inputbox or not. If you do reloads from the command line (or batch files) you can use the /v option to pass a variable for the same purpose.


talk is cheap, supply exceeds demand
Not applicable
Author

Well, that almost helps.

It was very easy to just default the date within the script. So my question is:

If I pass parameters from the command line, what happens with the input boxes? Does the /v option fill in the input boxes, or do I still have to remove them from my script?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You don't have to remove them.You check for the parameter and if it exist you don't ask for input, if it doesn't exist you do ask for input. Something like this:

IF (Len(Trim(vStartDate))=0 or IsNull(vStartDate)) THEN

  Let vStartDate = Input('Enter Start Date (MM/DD/YYYY)', 'Input required');

ENDIF;

at the end of the script after you're done using vStartDate reset it so it has no value next time you reload:

LET vStartDate = Null();


talk is cheap, supply exceeds demand