Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
I want to have access to the selected values: I want to do this with an click-Event: Go through every element, look at the Current Selection Box and read the data in there.
var doc;
function getObjectList() {
doc = Qv.GetCurrentDocument();
doc.GetAllObjects(function (objects) {
for (var i = 0; i < objects.length; i++) {
var obj = objects;
var id = obj.id;
var caption = obj.caption;
var type = obj.type;
var my = obj.my;
console.log("[obj:" + obj + " id:" + id + " caption:" + caption + " type:" + type + " my: " + my + "]");
if (type === "Statusbox") {
var object = doc.GetObject(id);
//object data is empty, why is this empty, I have some data in there
var dataContent = objekt.Data.Rows;
for (var i = 0; i < dataContent.length; i++) {
var content = dataContent;
console.log("Name: " + content[0].text + " Value: " + content[2].text + " Optional: " + content[1].text);
}
}
}
}
)};
Do you have some idea?
I am here on the right way: Because this help me not. Must I change something directly in the qvw-App, or is this code not correct.
var sizeOp = { "size": 20 };
var currentSelectionOptions =
{
onChange: function () {
$('#txtboxQv').empty();
var data = this.Data.Rows;
for (var f = 0; f < data.length; f++) {
var field = data
var name = field[0].text;
var vals = field[2].text;
$('#txtboxQv').append(name + ":" + vals);
}
},
fields: [sizeOp]
};
doc.GetCurrentSelections(currentSelectionOptions);