Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
is there a way to set a variable for the current environment during reload?
I have an app on premise which loads data from a QVD path vQVDPath = 'lib://ProdData/1.QVD/'
when I upload the same app to the SaaS environment I would like to be able to reload it without any change by adding something like
If vEnvironment = SaaS then
Set vQVDPath = 'lib://Sales:DataFiles/';
else
Set vQVDPath = 'lib://ProdData/1.QVD/'
End if
Or is there a better way to avoid changing the app once it is uploaded.
Hi @didierodayo
Try with ComputerName() function, hope both are different and it will help you
What I am doing at the moment is
////|Prem | SaaS
Let vEnvironment = 'SaaS';
If '$(vEnvironment)' = 'SaaS' then
Set vQVDPath = 'lib://Sales:DataFiles/';
Else
Set vQVDPath = 'lib://ProdData/1.QVD/'
EndIf
This works as long as I remember to switch between Prem and SaaS. That is why I am wondering if there is a systematic way to detect where the app is being reloaded?
thanks
Hi @didierodayo
Try with ComputerName() function, hope both are different and it will help you
Hi Mayil,
I thought Computer might work but because it is cloud this can change without notice. I have posted an idea for a system variable to be defined that results in a fixed value. Hopefully Qlik it embraced.
Hi @didierodayo
Okay, Hope Your OnPremise won't change often right, in that case, you can swap the if condition
If ComputerName()= 'OnPremiseCompName' then
Set vQVDPath = 'lib://ProdData/1.QVD/';
else
Set vQVDPath = 'lib://Sales:DataFiles/';
End if