Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am quite new to Qlikview and I am struggling a bit finding a way to pull data into my JS Extension.
The application I am building the extension for is pulling data from an SQL Server DB and is stored in Qlikview memory.
How can I access that data? Would it be better if I pull it straight in my Extension from the SQL DB?
That certainly depends on what you want to achieve with your data. If you already have a preaggregated table in SQL Server DB which you want to display one-to-one on a web page via Java Script - just go ahead and create your webpage - you don't need QlikView for that.
If, however, you need fast in-memory aggregations on the fly and calculations which will react to filter selections e.g. - then you might use the QlikView engine to achieve that and possibly present the results in an extension object. In that case, though, I would always urge you to have a look at presenting the data in a native QlikView object. Either way, you'll need to go and implement your solution within a QlikView document hosted on a QlikView Server.
If you still think going ahead with an extension is the only way to satisfy your requirements, then have a look at the below Extension tutorials, which will show you how to access the data and display it in JS. It's not really hard to develop, but bear in mind you'll need JavaScript coding skills as opposed to basic QlikView skills.
QlikView Extension tutorials, documentation and examples - The Qlik Fix! The Qlik Fix!
Hello Martin, thank you for the reply.
The application I am trying to do this for is already created in qlikview. I have built an extension in JS and integrated it fine.
The app is pulling the data from an SQL Server DB and I understood it stores it in Qlikview memory. I want to make use of that data in my JS so I can display different stuff.
For example this is how the data is loaded in some of the other pages:
LOAD PK_TeamKey,
//team_id,
TeamName,
TeamName as Team,
TeamFlag,
TeamHomeStadium,
TeamShirtImage
FROM
[..\3_QVDs\QVDs\Teams.qvd]
And I want to make use of this in my script.js file - store them in some variables and then be able to play around with them.
Hello Jagan, thanks I had a look at that before but I'm not too sure it answers my question.
Ok so I've had a look at the tutorials and I kind'off understood how to get the data into JS. But still don't know how to set my dimensions.
This is something you'll need to do in the QlikView Client. Open the .qvw and then switch to AJAX mode (WebView). Add the Extension object that you just created, right click, and add dimensions & measures. These can then be picked up by this.Data[0][0].Value (I think) etc.
And do you happen to know how to set my dimensions? For example I don't want to set the properties of the extension every time I open up the app. Cant I just edit the definition.xml somehow?
You should be able to achieve this. I strongly recommend you to have a look at already existing extension objects, there should be plenty on the community - if you find any that already has the dimensions defined .e.g., compare the code and implement accordingly.
Would you be kind enough to send me a link to some of these existing extension objects? I have looked online a bit but can't seem to find what I'm looking for. Maybe you could point me in the right direction.