Forum Discussion
multi selection with AND operator
- 7 years ago
Hi Anonymous,
I can't tell from your snippet how your selectionIds are generated, I believe you'll need to apply both columns to your ISelectionIdBuilder in order to generate one that intersects both categoricial values.
Not sure if you've previously referred to this page, but it covers how you might chain the createSelectionId method with multiple values (for instance, .withCategory() and .withSeries()).
If you're not having much luck with this, perhaps you can share your capabilities.json and your view model mapping code? We can have a look and see if we can get a little further with it for you.
Regards,
Daniel
Hi Anonymous,
I can't tell from your snippet how your selectionIds are generated, I believe you'll need to apply both columns to your ISelectionIdBuilder in order to generate one that intersects both categoricial values.
Not sure if you've previously referred to this page, but it covers how you might chain the createSelectionId method with multiple values (for instance, .withCategory() and .withSeries()).
If you're not having much luck with this, perhaps you can share your capabilities.json and your view model mapping code? We can have a look and see if we can get a little further with it for you.
Regards,
Daniel
hi dm-p
I'm already solve this, the key is not how the manager to select but how the builder to create selectionId, right as your comment.
the hard way with matrix are how to create selectionId with row parents and columns parent.
this is my function with recursive children
if (x.values) {
let keys = Object.keys(x.values);
keys.forEach(k => {
let keyNum = Number(k);
let builder = host.createSelectionIdBuilder();
copyParents.forEach(p => {
builder.withMatrixNode(p, matrix.rows.levels);
});
let colRef = columnsRef[keyNum];
colRef.nodes.forEach(p => {
builder.withMatrixNode(p, matrix.columns.levels);
});
let _td: DataListSelection = {
value: x.values[k],
selectionId: builder.createSelectionId(),
}
listSelectionPerRow.push(_td);
});
}