Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
khaycock
Creator
Creator

Binary load QVW with calendar

I am binary loading a .qvw file which has a calendar in the script (which is brought in using a text file). Within the text file has all the calendar variables and they have all be brought across properly into the app, however the calendar part of it doesn't seem to be updating even though it is updating in the qvw.

To be more precise, there is a variable in the calendar text file which states how many work days there are left in the month. This variable is still saying the same amount of days as there was when I first initially made the connection on the 6th July and saying 20 days left, when it should be 13. 

Is it not possible to use the calendar variables through a text file > qvw > sense? Because the variables are physically there I thought it had worked fine but the fact they are displaying different data is confusing me.

Labels (1)
6 Replies
petter
Partner - Champion III
Partner - Champion III

A binary load will not bring over variables from the file it loads from.

You could persist the variables in the original file into a table as a data island and then the table will be brought over and you can have a small routine that extracts the variables from the table and recreate them.

khaycock
Creator
Creator
Author

So even though the variable shows as its there and its generating a number, it's not properly there functionality wise?

petter
Partner - Champion III
Partner - Champion III

You might have had it already in your application before doing any binary load.... 

petter
Partner - Champion III
Partner - Champion III

A quote from the documentation:

The binary statement is used for loading the data from another Qlik Sense app or QlikView document, including section access data. Other elements of the app are not included, for example, sheets, stories, visualizations, master items or variables.

petter
Partner - Champion III
Partner - Champion III

You could also import the variables from the QVW by just reading the XML-part of the QVW and recreating the variables like this after your binary load:

[IMPORTED VARIABLES]:
LOAD
  'SET ' & Name & '= ''' & Replace(RawValue,'''','''''') & '''' AS Var
FROM [SameAppAsForBinaryLoad.qvw] (XmlSimple, Table is [DocumentSummary/VariableDescription])
WHERE IsReserved='false' AND Match(Name,'testv','v1','v2');

vars=Peek('Vars',0,'IMPORTED VARIABLES');
$(vars);      // will execute what is in the string literally
vars=;
DROP TABLE [IMPORTED VARIABLES];

In this way you don't have to persist any variables in the orginal QVW file since they are actually persited in the XML-part of the QVW anyway....

khaycock
Creator
Creator
Author

I've managed to binary load the Qlik Mart.qvw rather than the final dashboard.qvw and then load the calendar text file by itself in the Qlik Sense app script which then imported all of the variables. However I'm now having issues with set analysis statements in a KPI that doesn't seem to want to register the fields from the calendar and the binary load in the same set analysis and I have no idea why. All the fields exist so I have no idea why they wouldn't generate!