Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
KHSDM
Creator III
Creator III

Reload Task with Parameter

Hi all,

Is it possible to create reload task in Qlik Sense where I can specify the parameter/variable value? My objective is to create an generic app that load data from the data source. But I need multiple reload task where I can filter the data based on the parameter/variable value.

For example:-

App A:

LOAD * FROM Sales

where Company = '$(vCompany)'

In the reload task, I can assign the value to variable vCompany. I can input which company that I want to load. I also want to create multiple task with different value so that I can load different company data but maintaining only 1 app.

Is it possible in Qlik Sense?

Labels (4)
5 Replies
vinieme12
Champion III
Champion III

create a sub routine

 

Sub ReloadThis(vSource,vFinalQvd,vFilter)

$(vFinalQvd):

SQL

Select * from $(vSource) 

Where field = '$(vFilter)';

 

Store  $(vFinalQvd) into lib:\\somepath\$(vFinalQvd).qvd;

drop table $(vFinalQvd);

End Sub

 

call ReloadThis('dbo.mysourcetable1','Table1','ABC');

call ReloadThis('dbo.mysourcetable2','Table2','XYZ');

call ReloadThis('dbo.mysourcetable3','Table3','something');

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
KHSDM
Creator III
Creator III
Author

Hi,

This method is we create the subroutine in the script right? We dont want to do it in 1 single app because we need to run the tasks independently.

vinieme12
Champion III
Champion III

if you are going to create separate apps anyways you can just hardcode everything

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
KHSDM
Creator III
Creator III
Author

Sorry, my reply earlier is a bit confusing. What I want is 1 app and I can pass parameter to the app so that the app can load data based on the parameter provided. The parameter/variable cannot be stored in the app itself as we need to load the data based on the parameter provided in the reload task. This is because we will create multiple task with different parameter to generate different QVDs.

vinieme12
Champion III
Champion III

You cannot trigger one app multiple times /simultaneously though! 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.