Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello qlikers,
I've a quick question for you laid on the beach!
I'm using my QDF scripts in both Qlik Sense and Qlik View. The question is: how do I know, from a script perspective, which environment I am dealing with? This can be useful, for instance, during an automated "LOAD" of QVDs: if you are in QS, to identify the path of the file you have to use "/" while in QV you have to use "\".
Any idea?
Thanks a lot and have a nice summer time!
Brunello
This is my actual script: it looks like I'm able to make it work on QS or QV but not both!
LET QVD = '$(vG.LoadPath)';
// Generate the Loop for each value in the LIST_OF_TABLES table
FOR EACH vFileName IN filelist(QVD& '\*.qvd')
IF NOT ISNULL('$(vG.HomeContainer)') THEN
LET vFileBaseName=replace(subfield('$(vFileName)', '/', -1), '.qvd', '');
ELSE
LET vFileBaseName=replace(subfield('$(vFileName)', '\', -1), '.qvd', '');
ENDIF
[$(vFileBaseName)]:
LOAD
*
FROM $(vFileName) (qvd);
next vFileName