Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Sovon123
Contributor
Contributor

Filter Component in Mashup with TypeScript

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();
}

Sovon123_0-1715600375232.png

 

Labels (1)
  • SaaS

0 Replies