Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
can you explain me how I can get the values (text) from a qlik listbox in a script.js of an extension?
Thanks,
Gab
I have solved.
var doc= Qv.GetCurrentDocument(); | |
var lb = doc.GetObject("LB01"); |
texta=lb.Data.Rows[1][0].value;
The last problem is that this solution work in access point, not in desktop version (Error Data.Rows.1.0 is null or not a object
Check this: Re: Re: Passing data from qv to extension
I want only the Age values and I have created these lines in Definition.xml
<Dimension Label = "Age", Initial="Age" TargetName="Age"/>
<Measurement Label="Age" Initial="Age" TargetName="Age" />
Can you explain me how use these lines in my script.js (attached)? I want to give (the first value) in the variable texta (of my script.js)
function InitSettings() {
// General Settings
// Chart Object ID: used to create a Unique Chart ID
_this.ExtSettings.UniqueId = _this.Layout.ObjectId.replace("\\", "_");
// Use _this.ExtSettings.Color in your main script if you want to setup the color of something.
_this.ExtSettings.Color = _this.Layout.Text0.text;
}
function InitData() {
var dataset = [];
for (var i = 0; i < _this.Data.Rows.length; i++)
{
var vMaker = _this.Data.Rows[0].text;
var vModel = _this.Data.Rows[1].text;
var vType = _this.Data.Rows[2].text;
var vSales = parseInt(_this.Data.Rows[3].text);
// I just put all data from the row into one node.
dataset.push({"Maker":vMaker , "Model":vModel , "Type":vType , "Sales":vSales , "index":i});
}
I have solved.
var doc= Qv.GetCurrentDocument(); | |
var lb = doc.GetObject("LB01"); |
texta=lb.Data.Rows[1][0].value;
The last problem is that this solution work in access point, not in desktop version (Error Data.Rows.1.0 is null or not a object