Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48717

multi selection with AND operator

$
0
0

hi community

 

I have 2 selectionId,

1. select the city with value "Malang"

2. select the month with value "3"

 

this is the my code 

 

                let list : ISelectionId[] = [];
                list.push(this.model.dataPoints[0].selectionId); // city == Malang
                list.push(this.model.dataPoints[index].selectionId); // month == 3

                // console.log('sebelum', this.model.dataPoints[index].selectionId);
                // let includes = this.model.dataPoints[index].selectionId.includes(this.model.dataPoints[0].selectionId);
                // console.log('includes', includes);
                // console.log('hasil includes', this.model.dataPoints[index].selectionId);

                // ISQExpr.and

                selectionManager.select(list, true).then((ids: ISelectionId[]) => {
                    console.log('hasilnya', ids);
                });

 

but the result are "select all city with month == 3 or city == Malang"

 

how to make multiple selectionId with and operator?

the expected result only show month == 3 && city == Malang


Viewing all articles
Browse latest Browse all 48717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>