Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to understand why qSelectionObject is returned with multiple rows when selections are made in same field but in different object.
I think the reason is somewhere linked with dynamic calculation of dimension field but Sense Current Selection object in sense application is showing selections properly.
The method used to retrieve the list of selection is -
app.getList("CurrentSelections", function (reply) {
The dimension is dynamically calculated but the same expression is used in the filter object and as a dimension in the pivot table.
The expression for dimension is as below in both pivot table and in the filter box -
=$(='[' & Only([FieldName]) &']')
When I make selection in the Filter box and later in the pivot chart, I see two rows for same field in the array returned by reply.qSelectionObject.qSelections.
This is creating confusion as I am showing these selection in the .NET page, not sure why it is happening? Any help will be highly appreciated. Thanks in advance!
Please let me know if you need more information.
app.createList({
qDef: {
qFieldDefs: ["myfieldname"] //set fieldname
},
qAutoSortByState: {
qDisplayNumberOfRows: 1
},
qInitialDataFetch: [{
qHeight : 100, //can set number of rows returned
qWidth : 1
}]
}, function(reply) {
var rows = _.flatten(reply.qListObject.qDataPages[0].qMatrix);
var selected = rows.filter(function(row) {
return row.qState === "S";
});
console.log(selected);
});
To learn more visit Techzoan