Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
lucianoginqo
Partner - Contributor III
Partner - Contributor III

QDF and Qlik Sense. Creating Shared Global Variables

Hi all,

I might be wrong but using the QDF with Qlik Sense, the Shared Global Variables are not automatically generated?

I currently use a separate LIB mount and I am testing it using Qlik Sense Desktop

The Variables for the home container are generated correctly but the Shared variables are not created

I am trying this syntax

SET vG.HomeContainer='lib://1.LibName\';

$(MUST_Include=$(vG.HomeContainer)\InitLink.qvs);

Or this

$(MUST_Include=lib://1.LibName/3.Include\1.BaseVariable\1.Init.qvs);

Seems like the LCGV( function is not working for me too

Anybody with the same experience?

Thank you

18 Replies
Magnus_Berg
Employee
Employee

Hi Luciano, sorry for late reply. The first syntax is the correct one using InitLink.qvs. You must have map the LIB names with the framework prefix names. This means that you need a lib for your home container and another lib named Shared pointing to the Shared container in your framework setup.

Hope that this helps.

Regards

Magnus

lucianoginqo
Partner - Contributor III
Partner - Contributor III
Author

Thank you Magnus!

I understand that I have to map the LIBs using the QDF Prefixes (Before I named them using the Container folder name - ie 99.Shared)

Now I mapped them using the Variable Prefixes (Admin, Shared, ...)

However something is still not behaving for me

This is the script result

2016-02-26_1-20-20.png

Any idea? I am assuming this is not the expected behavior of the QDF Init...

Thank you

Magnus_Berg
Employee
Employee

Hi Luciano, no it's not an expected behaviour. You need as mentioned earlier when (using separate mounts) use the prefix names as lib connections. Noticed that the script is trying to find the lib named 99.shared, the default prefix for shared is Shared, not 99.shared. What Qlik Sense version are you running? Could you attach a log file?

Best regards

Magnus

lucianoginqo
Partner - Contributor III
Partner - Contributor III
Author

Thank you Magnus, see the attached Log

I reduced the script to only a couple of lines, just the QDF Init...

Magnus_Berg
Employee
Employee

Hi Luciano, thanks for the log. I noticed that you are using Qlik Sense 2.2, there is a newly identified bug in 2.2 that is breaking the script. The FileSize function does not recognise wild cards anymore. QDF is using the vL.FileExist function to validate content, this function is broken due to the bug. Ive attached a workaround, just for 2.2 version (hoping the bug gets fixed instead of changing code in general). Just replace 1.FileExist.qvs in all containers with the one attached. Hope that this helps.

Best regards

Magnus

namhai_fr
Partner - Contributor
Partner - Contributor

Hi Magnus,

I'm facing the same issue than Luciano and I'm also using Qlik Sense 2.2.

I use your new version of FileExist file attached to your previous post but the issue is still there. You find attached to this post a compressed file containing the screenshot of the error code with the associated log file for the current FileExist file and for your new FileExist file.

FYI: the error occurs on Qlik Sense Desktop 2.2. I haven't performed any test on Qlik Sense Server 2.2.

Best regards.

Nam-Hai

lucianoginqo
Partner - Contributor III
Partner - Contributor III
Author

Yes, still not working for me too even with the new FileExist subroutine

Magnus_Berg
Employee
Employee

Hi and thanks for your info, sad that the work around did not work. Luciano, could you please send your log file?

Will have a look at it and see if I can find the issue.

Thanks

Magnus

maximiliano_vel
Partner - Creator III
Partner - Creator III

Hi, I have the same problem, but I got it working when I move the the file from the Qlik Sense Apps directory to the App Container (i.e. 1.Application) and then drag and drop over Qlik Sense Desktop. On the sever no joy.

Regards-