Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Define globale variable for fileshare as source document folder

In our QlikView Server Installation we use a DNS alias pointing to server file share to provide the users access to the source document folder.

Having linked this fileshare to a local drive on my Windows PC the Deployment Framework script running during reloading the application creates global variables starting with the local drive.

Examples are shown in this screenshot of variable overview:

How can I define the fileshare as global variable within QDF to get this variable used instead of the local drive within the load script?

I appreciate any help.

Best regards,

Paul.

1 Solution

Accepted Solutions
Magnus_Berg
Employee
Employee

Hi Paul, as the global variable mapping is dynamic (and validated during every reload) the mapping URL will be the one used when opening the application, if you create a mapped drive and reload the mapped path will be used. So to use the UNC path you need to open and reload the app using the UNC path \\chqlikviewdev\QlikDev\ (you can paste the url in the explorer window). This logic is created so that you can move applications between containers without the need to change any parameters, and using unc or fixed drive should not make any difference as QDF takes the url that is available at the moment. hope that this helps.

Best regards

Magnus

View solution in original post

6 Replies
Not applicable
Author

Hi all,

First appologies for my missing Netiquette.

Meanwhile I found that creating the variable record "vG.RootPath" with the DNS alias as variable value  in Custom.Variables.csv of  Administration Container 0.Administration\3.Include\1.BaseVariable helps.

Thanks for willing to help.

Best regards,

Paul.

Magnus_Berg
Employee
Employee

Sorry Paul for late reply, totally missed your request   Every time the QDF initiation script is executed a global variable validation is taking place, automatically validating the mappings. So if you open and load an application using a UNC/DNS path (\\Server\share) these url's would replace the mapped z:

From 1.7 there is a variable cache introduced to minimize script execution, so if you execute using a UNC path but still have the Z path available the cache will not remap the global variables (instead reuse z:). You can disable the cache by adding the rows before initiation:

set vG.BasePath=;
set vG.SharedBasePath=;


From the reference guide:


Clear Initiation Cache

To speed up initiation, a variable cache function has been introduced (v1.7 and later). The cache will validate the Home and shared container root path, if path is the same as last initiation then old global variables will be used. When the cache is used, these lines appear in log and output window.
'### QDF Info, Global Variables using cache'
'### QDF Info, Shared Global Variables using cache'

To override the cache function, add these lines before the initiation script.

set vG.BasePath=;
set vG.SharedBasePath=;

Not applicable
Author

Hello Magnus,

Thanks for your reply.

My Approach to get the global variables filled with UNC path instead of Z: drive is certainly wrong. But I do not find the mistake.

I do the following steps:

  • From a Basic colleague I received the UNC/DNS path \\chqlikviewdev\QlikDev\ to the source document folder of the Server Environment.
  • I use Windows function "Map Network drive" to create a Network drive like "P:" (I intentionally use different characters on each attempt to see what was processed by QDF.)
  • I drop down to the application folder of my Container
    For example "P:\099.IT_Services\003.Process_analysis\002.Lab_Overview\001.Applications\1.Application"
  • Start the QlikView application with doubleklick on the QVW file. (In this example  "Lab_Overview_Application.qvw") and
  • Run the reload.

As result the global variables are filled with the path from the local Network drive. For example variable "vG.ColorSchemePath" is filled with "P:\099.IT_Services\003.Process_analysis\002.Lab_Overview\001.Applications\3.Include\5.ColorScheme\"

How can I tell the QDF to use the UNC/DNS path \\chqlikviewdev\QlikDev\ instead of the local Network drive?

What do I do wrong?

Is there a global variable that I can fill with the UNC/DNS path file://chqlikviewdev/QlikDev/in the QDF Administration Settings or in the Management Console to get it used instead of the locally mapped drive?

My try with "vG.RootPath" did not work out well.

Adding the commands

set vG.BasePath=;
set vG.SharedBasePath=;

unfortunately does not help.

Background of my attemts is to get the loading done
- Independent of the Network drive Definitions of  the different user and

- without changes when the reload is done by the Management console job.

Thanks for any help.

Best regards,

Paul.

Magnus_Berg
Employee
Employee

Hi Paul, as the global variable mapping is dynamic (and validated during every reload) the mapping URL will be the one used when opening the application, if you create a mapped drive and reload the mapped path will be used. So to use the UNC path you need to open and reload the app using the UNC path \\chqlikviewdev\QlikDev\ (you can paste the url in the explorer window). This logic is created so that you can move applications between containers without the need to change any parameters, and using unc or fixed drive should not make any difference as QDF takes the url that is available at the moment. hope that this helps.

Best regards

Magnus

Not applicable
Author

Hello Magnus,

Thanks for your answer.

I tried as you explained and it works fine.

Entering the UNC path in the address toolbar of Windows Explorer opens it as node in the Network tree.

And here I can drill down and start the QVD just as with the device letters.

So my problem was more handling Windows proper than managing QDF.

Thanks again.

Best regards,

Paul.

Magnus_Berg
Employee
Employee

Great Paul, that everything worked out. Could you please apply "Correct Answer" to this discussion. Thx /Magnus