Discussion Board for collaboration on QlikView Scripting.
Please help on this option.
I need to give parameter as an input to the qlikview document.
Ex : Load EmpName,Salary;
SQL select EmpName,Salary from EMP where Salary >= '$Parameter';
I need to give parameter externally.
This is very good question. Even I also want the solution for this problem. It will be great thanks if any body give the solution ASAP.
As i see it, the parameter has to be read into qlikview before you can execute the sql statement.
A solution could be to store the parameter in a txt-file and then let qlikview read from this file an store the result in a variable.
If your parameter is dynamic, and defined in sql tables, you can create an sql statement to get the parameter result, and store that value in a varable.
You can then use the variable as a parameter in the sql statement.
Many thanks for prompt reply.
So in this case I need to update text file when ever I need to reload the document.
Don't we have any option like after hitting the "Reload" button, QlikView Document should ask to enter parameter?
In that case you can create an input box and maintaine the value of the variable in the inputbox.
The variable stored from an inputbox can be used in the script and in a SQL statement.
You can use the spécial $(variable) command in your SQL Querry. Exemple for loading from a schema all table name.
SET vFieldName = 'MyTableName';
SET vDbSchema = 'MySchemaName';
SQL SELECT tablename as "$(vFieldName)"
WHERE schemaname = '$(vDbSchema)';
Check this thread on the subject, to get the user prompted when reloading.
Hope that helps.