Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
JM
Contributor III
Contributor III

QDF initiation scripts

I am trying to create a sample application in QDF environment couldn't able reload the script.  I have only created a QDF Tab in the script and added following lines:

$(Include=..\..\..\..\InitLink.qvs);

$(Include=..\..\..\InitLink.qvs);

$(Include=..\..\InitLink.qvs);

$(Include=..\InitLink.qvs);

$(Include=InitLink.qvs);

But application doesn't load anything, I enabled the application log and following log was generated:

31/01/2017 2:35:25 PM:      Execution started.

31/01/2017 2:35:25 PM:      QlikView Version:11.20.13206.0

31/01/2017 2:35:25 PM:      CPU Target                    x64

31/01/2017 2:35:25 PM:      Operating System              Windows 7 Enterprise Service Pack 1 (64 bit edition)

31/01/2017 2:35:25 PM:      Wow64 mode                    Not using Wow64

31/01/2017 2:35:25 PM:      MDAC Version                  6.1.7601.17514

31/01/2017 2:35:25 PM:      MDAC Full Install Version     6.1.7601.17514

31/01/2017 2:35:25 PM:      PreferredCompression          2

31/01/2017 2:35:25 PM:      EnableParallelReload          1

31/01/2017 2:35:25 PM:      ParallelizeQvdLoads           1

31/01/2017 2:35:25 PM:      AutoSaveAfterReload           0

31/01/2017 2:35:25 PM:      BackupBeforeReload            1

31/01/2017 2:35:25 PM:      EnableFlushLog                0

31/01/2017 2:35:25 PM:      SaveInfoWhenSavingFile        0

31/01/2017 2:35:25 PM:      UserLogfileCharset            1200

31/01/2017 2:35:25 PM:      OdbcLoginTimeout              -1

31/01/2017 2:35:25 PM:      OdbcConnectionTimeout         -1

31/01/2017 2:35:25 PM:      ScriptWantsDbWrite            false

31/01/2017 2:35:25 PM:      ScriptWantsExe                false

31/01/2017 2:35:25 PM:      LogFile CodePage Used:        1200

31/01/2017 2:35:25 PM:       Reload Executed By GLOBAL\macknoj

31/01/2017 2:35:25 PM:       Process Executing: QlikView Desktop

31/01/2017 2:35:25 PM:       Process ID: 8912

31/01/2017 2:35:25 PM:      Execution finished.

I have executed scripts in QDF environment and never faced this issue before. What could be the issue?

Where exactly InitLink.qvs file located?

Thanks,

J.

1 Solution

Accepted Solutions
Vegar
MVP
MVP

It looks like your qvw is not catching any of your InitLink-includes.

Try to identify which one that it should run. If your application lies in the 1.Application folder it is the $(Include=..\InitLink.qvs) statement.

Change that to line of script into

$(Must_Include=..\InitLink.qvs)

Must_include will throw an script error if it does not find the InitLink.qvs file.

If your container is copied from somewhere else it is a chance that the hidden InitLink.qvs was not included in that copy.

Cheers, Vegar Lie Arntsen  

 

--

Sent from my Oneplus using K-9 Mail. Please excuse my brevity.

View solution in original post

11 Replies
Vegar
MVP
MVP

It looks like your qvw is not catching any of your InitLink-includes.

Try to identify which one that it should run. If your application lies in the 1.Application folder it is the $(Include=..\InitLink.qvs) statement.

Change that to line of script into

$(Must_Include=..\InitLink.qvs)

Must_include will throw an script error if it does not find the InitLink.qvs file.

If your container is copied from somewhere else it is a chance that the hidden InitLink.qvs was not included in that copy.

Cheers, Vegar Lie Arntsen  

 

--

Sent from my Oneplus using K-9 Mail. Please excuse my brevity.

JM
Contributor III
Contributor III
Author

Thanks for the suggestions but it didn't work, when I used Must_Include instead of Include. My code looks like following:

$(Must_Include=..\..\..\..\InitLink.qvs);
$(Must_Include=..\..\..\InitLink.qvs);
$(Must_Include=..\..\InitLink.qvs);
$(Must_Include=..\InitLink.qvs);
$(Must_Include=InitLink.qvs);

It did give me errors but for only first two includes than execution stopped, nothing happened next. When I removed all the statements except $(Must_Include=..\InitLink.qvs); it worked. I have few questions:

Is there any error count settings for includes, before the script exits?

If InitLink.qvs, resides in the container folder than why do we need to put all the other include lines? Shouldn't the documentation just point where the InitLink.qvs resides in the container and developers will modify their include paths according to it.

And I couldn't find the hidden InitLink.qvs anywhere in the container (it was generated by QDF Tool).

Thanks,

J.

Vegar
MVP
MVP

Yes it is in the root of the container. The reason for multiple lines would be to handle applications within subfolders in the 1.Application folder.

If you don't have the initLink file then try to fetch it from another container, if not then try to initiate the qdf by pointing to the

../3.Include/1.BaseVariable/init.qvs

Magnus_Berg
Employee
Employee

Hi Jawed, It's strange that you can't find the InitLink.qvs that should reside (hidden) in each container base folder? The reason for Cascading includes is that you can move the application up and down in a folder structure without breaking the script. You can not use several cascading must_include as must_Include always break script if url not found.

My suggestion for you is to download the latest QDF version start Deploy Tool and point to the Framework root folder, here you either upgrade or reinitiate the framework depending on your current version (take a backup before). This will update code in all containers as well as the InitLink.qvs file.

Hope that this helps.

Best regards

Magnus

Vegar
MVP
MVP

mbg it is possible to loose the InitLink.qvs. I have experienced loosing the initLink.qvs when selecting everything inside the root of a container and copying it into another folder.

It is easy to avoid if you know about it, but it is possible.

jawed.macknojia‌: I usally set my file explorer to show hidden objects. If you do that you will be aware if you have lost the initlink file.

Magnus_Berg
Employee
Employee

Hi Vegar, as InitLink is system/hidden it might not follow if you copy paste content inside a container but it will follow if you copy the container itself. But as long as you have a correct container map it's easy to recover the InltLink using the reinitiation function in Deploy Tool.

Regards

Magnus

JM
Contributor III
Contributor III
Author

Yes, it is strange. I have enabled the option to show the hidden files, but still I can't see it, but I am able to open it in the text editor via the physical location of the file. So InitLink.qvs is there but can't see it in Explorer.

Cascading the includes, I am getting errors but for first two includes than execution stops, nothing happens. Is there any error count settings for cascading includes, before the script exits?

I think there is a better way of doing it:

Let vInitLinkPath = Left(DocumentPath(), Index(DocumentPath(), '\1.Application'))& 'InitLink.qvs';
$(Include=$(vInitLinkPath));

Appreciate your thoughts on the above approach.

Thanks,

J.

Vegar
MVP
MVP

Great idea. I think it will work. Personally I would have changed the Include into a Must_Include.

Your method will even work in environments with framework using the old initiation method calling directly for the 1.init.qvs file.

Let vInitLinkPath = Left(DocumentPath(), Index(DocumentPath(), '\1.Application'))& '3.Include\1.BaseVariable\1.init.qvs';

$(MUST_Include=$(vInitLinkPath));

JM
Contributor III
Contributor III
Author

Thanks for your feedback, I have put up an idea for dynamic QDF initialization here.

Cheers