Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have developed an UI that is using highchart for graphs and getting data through hypercubes.
Everything is working fine except data filters that is getting passed from UI.
I have 10+ filters and except date filters everything working as expected.
Can any expert help me out here:
Code:
------------------------------------------------------------------------------------------
async onSelectSingleDate(date){
const myDate = moment(date).format("YYYY-MM-DD");
console.log('myDate', myDate);
//create the expression - the result from this expression gets the values that are between the selected dates
const dateExpression = `=Concat({<[Bookings Date]={"${myDate}"}>} distinct [Bookings Date],',')`
console.log('dateExpression', dateExpression);
//evaluate expression to get the selected dates
const expressionResult = await this.qlikService.evaluateExpression(dateExpression);
console.log('expressionResult', expressionResult);
// collect the values to select
const selectedValues = [{qText: expressionResult, qIsNumeric: true, qNumber: new QSDate(moment(expressionResult)).getIntegerValue() }];
console.log('selectedValues', selectedValues);
//apply values
await this.qlikService.selectMultipleValuesPerField('Bookings Date', selectedValues);
//refresh data
await this.refreshData();
}