Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Best practise to persist data/config in mashup?

I've been thinking about how to store user settings in a mashup, and I don't know where to start.

For example if I create a mashup like the Qonnections 2015 on Qlik Branch and want the users to store their tab config as a preset that is available for the user over different sessions. How would you best go about and do that? Both with published and unpublished mashups

Here are some of my ideas

  • write to a json file in the same directory as the mashup?
  • Store data in an app that is published and save the app?
  • Run a load script that store data in file or database?
Tags (1)
1 Solution

Accepted Solutions
erik_wetterberg
Honored Contributor

Re: Best practise to persist data/config in mashup?

Another option is to use local storage. Easy to implement, but the settings will be stored client side, so if the user uses another device he wont get the same settings (like if you open your mashup on a tablet you will not have the same settings as on the desktop).

Erik

Erik Wetterberg
https://extendingqlik.upper88.com/
4 Replies
Employee
Employee

Re: Best practise to persist data/config in mashup?

Hmm, I would careful around assigning to much application logic into the QVF.

For example, for branch.qlik.com we use MongoDB to store user profiles, user preferences and then we use Qlik to search and filter data from MongoDB.

Now with that said, if you do want to persist those kinds settings into the QVF you can of course. I would probably persist a GenericObject with default settings and then create a GenericObject per user and store that. You can then leverage the standard Qlik apis to interact and fetch those objects and you don't need to introduce any additional server side components.

Luckily our Generic Objects are truly generic, you can store whatever full dynamic properties you want it them. Heck you could even decode a mp4/avi into a array buffer and store that in your generic object if you wanted to (Don't tell our IT)

erik_wetterberg
Honored Contributor

Re: Best practise to persist data/config in mashup?

Another option is to use local storage. Easy to implement, but the settings will be stored client side, so if the user uses another device he wont get the same settings (like if you open your mashup on a tablet you will not have the same settings as on the desktop).

Erik

Erik Wetterberg
https://extendingqlik.upper88.com/
Not applicable

Re: Best practise to persist data/config in mashup?

That's great!

I learnt the hard way not to get too attached to your QVFs and always store a backup somewhere. Corrupted QVF still occur every now and then, but not as often as in 1.0.

Multiple app export from the QMC would be a real timesaver.

I think I will go with the localStorage approach but attaching additional data to a bookmark might be a possibility in my next/first mashup.

Not applicable

Re: Best practise to persist data/config in mashup?

This is what I was looking for. Easy to implement and no user managment. I will give it a go.

Thanks alot for all your help.

Community Browser