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: 
Anonymous
Not applicable

Cannot read property 'deltaCache' of undefined

Logs: Cannot read property 'deltaCache' of undefined

Well this is a mystery to me.  Can anyone shed some light on why this is happening and what the causes may be?

seem mostly to happen when I run this:

$scope.ClearFilters = function () {
   qsApp.clearAll(true).then(function () {
   viewModel.dateFilters = AdhocDatePickerService.setDefaults(viewModel.definedFilters);
   applyDateFilters();
  });
};

3 Replies
bmd
Employee
Employee

Hi Dale,

I see this query is a bit old and I hope you found a solution.  If so could you share what you've found?  This issue has just come up with the group I'm working with and only have speculation at this time.

A quick review of the code above looks as if you may be calling multiple selections asynchronously. Although the Qlik engine should be able to handle the requests and deliver data update events that will be eventually consistent to your current session objects, it may be better to serialize your requests by using the promises returned from selection calls or to create a bookmark programmatically and apply all selections in one call.  This would reduce the chance of data and object state collisions and may clear up your undefined object issue.

vadimtsushko
Partner - Creator III
Partner - Creator III

Hi Bmd

I'm particularly interested in second part of your proposal:


to create a bookmark programmatically and apply all selections in one call.  

Is there any method to do such a thing?

In Capability API Bookmark.create method creates a bookmark based on current selection and takes only 3 string parameters: Title, Description, and SheetId. 

https://help.qlik.com/en-US/sense-developer/November2019/Subsystems/APIs/Content/Sense_ClientAPIs/Ca...

JSON RPC Api's CreateBookmark seems to create bookmark based on current selection too, at least theres is no field for setting field selections in GenericBookmarkProperty doc entry 

https://help.qlik.com/en-US/sense-developer/November2019/APIs/EngineAPI/definitions-GenericBookmarkP...

 

Could you give any example of creating bookmark programmatically, to make possible setting several selections in one batch?

 

 

bmd
Employee
Employee

Yes, that is correct, the bookmark API will only create based on the current selections. This means that to programmatically create a bookmark you would need to set each selection the first time to create the bookmark for future use. Doing this may or may not fit requirements depending on the need to re-use the same selections.