Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlik Community,
I am trying to write some scripts that I would like to use in some QlikSense apps in both the QlikSense Server environment and in the Qlik Cloud environment. As part of these scripts, I and trying to write find a method to load from multiple QVD files that works in both environments, but I am having trouble finding a solution. Since wildcard loads do not work in the QlikSense Cloud environment, I am trying to use a for each loop with the FileList function to iterate through all QVD files in a data folder, and then use the WildMatch function to define the files that need to be loaded. An example script is below:
LET vRoot = 'lib://Data/';
For Each file In FileList('$(vRoot)')
If WildMatch('$(file)', '*.qvd') Then
Table:
Load
*
From [$(file)](qvd);
End If
Next file
The above script works in the Cloud environment but does not work in the Server environment. After some testing, I found that the Server environment requires '*.qvd' at the end of vRoot or the FileList function will not return any files found. If I add this then the script no longer works in the cloud environment. Does anyone know any workarounds or methods I could use that load from several QVD files in both the Server and Cloud environments?
Thanks,
Tyler
Hi
In that case, You can use 2 set of code and write the condition based on server/cloud to execute any one.