on 03-09-2022 10:29 PM
I am new to SAC Application Designer. I want to use calendar month results from one table as a source for selection in other charts. Struggling with the array syntax I should using for Cal_Months variable setDimensionFilter
var resultSet = CalMonth_Source.getDataSource().getResultSet();
//Reverse the order
resultSet.reverse();
var firstcall = 'X';
var Cal_Months=ArrayUtils.create(Type.string);
for (var i=0;i< resultSet.length; i++)
{
if(resultSet[i]["0CALMONTH"].description!=='Totals'){
//No syntax error when I use ID but my results
Cal_Months.push(resultSet[i]["0CALMONTH".id]);
//Based on other blogs I have read I am supposed to use the below syntax but I get errors that
//data context cannot be converted to string
// Cal_Months.push(resultSet[i]["0CALMONTH"]);
}}
console.log(Cal_Months);
ConsVendor.getDataSource().setDimensionFilter("0CALMONTH",Cal_Months);<br>
Try to console.log() the resultSet from the chart you need.
My suspicion is that the Chart you want to filter has a different Date hierarchy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.