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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

Variable passing help in Deployment

 

Hi,

Can any one please help me on below requirement.

We have a shared drive with Three folders like below

1. QliksenseDev

2. QliksenseUAT

3. QliksenseProd

We have to deploy Extract app with same script into Three environments.

We have the below script in Data load editor

LET vINCLUDE_PATH  = 'LIB://SampleDashboard/QliksenseDev/1.Include Files/';
$(Must_Include=$(vINCLUDE_PATH)Extract_App.qvs);
 
Is there any way to pass a Dynamic varibale on QliksenseDev place like below
when the app is in Dev Environment it has to pick the Extract_App.qvsfile from 'QliksenseDev' folder.
when the app is in UAT Environment it has to pick the Extract_App.qvs file from 'QliksenseUAT' folder.

when the app is in Prod Environment it has to pick the Extract_App.qvs file from 'QliksenseProd' folder.

Please help me on this.

Thanks in advance

1 Solution

Accepted Solutions
JordyWegman
Partner - Master
Partner - Master

Hi Mahitham,

Yes this is possible. What you need to do is use the function DocumentTitle().

//------------------------------------------------------------------------------------------
// DTAP section - no changes required below this line
//------------------------------------------------------------------------------------------
if index(upper(DocumentTitle()),'[Dev]') > 0 then
	let vDTAP = 'QliksenseDev';
    let vDTAPcode = 'Dev';
elseif index(upper(DocumentTitle()),'[UAT]') > 0 then
	let vDTAP = 'QliksenseUAT';
    let vDTAPcode = 'UAT';
else
	let vDTAP = 'QliksenseProd';
    let vDTAPcode = 'Prod';
end if

 What you need to do is add in all your apps Dev, UAT and Prod to the DocumentTitle. Then use the variable $(vDTAP) in your script:

LET vINCLUDE_PATH  = 'LIB://SampleDashboard/$(vDTAP)/1.Include Files/';
$(Must_Include=$(vINCLUDE_PATH)Extract_App.qvs);

Jordy

Climber

Work smarter, not harder

View solution in original post

3 Replies
JordyWegman
Partner - Master
Partner - Master

Hi Mahitham,

Yes this is possible. What you need to do is use the function DocumentTitle().

//------------------------------------------------------------------------------------------
// DTAP section - no changes required below this line
//------------------------------------------------------------------------------------------
if index(upper(DocumentTitle()),'[Dev]') > 0 then
	let vDTAP = 'QliksenseDev';
    let vDTAPcode = 'Dev';
elseif index(upper(DocumentTitle()),'[UAT]') > 0 then
	let vDTAP = 'QliksenseUAT';
    let vDTAPcode = 'UAT';
else
	let vDTAP = 'QliksenseProd';
    let vDTAPcode = 'Prod';
end if

 What you need to do is add in all your apps Dev, UAT and Prod to the DocumentTitle. Then use the variable $(vDTAP) in your script:

LET vINCLUDE_PATH  = 'LIB://SampleDashboard/$(vDTAP)/1.Include Files/';
$(Must_Include=$(vINCLUDE_PATH)Extract_App.qvs);

Jordy

Climber

Work smarter, not harder
mahitham
Creator II
Creator II
Author

Hi @JordyWegman 

Thanks for your solution its working great...

Good thing is this solution is working in Desktop and Server with DocumentTitle() System Function.

JordyWegman
Partner - Master
Partner - Master

Good to hear! Good luck with the implementation.

Jordy

Climber

Work smarter, not harder