Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

sebastian_serva
New Contributor III

Evaluating background color expression in pivot table

Hi all,

I'm using the Capabilities API to get the model of a pivot table and build a custom JS table:

app.getObject('domID', objID).then(function(model){

     // Parse model and build custom table

});

The pivot table has 3 measures and each measure has a background color expression.

I noticed that this expressions come through in the measureInfo object, under qAttrExpression. The issue is that the expression comes through as it appears in Sense:

qFallbackTitle = "if(value > 20, green(), red())"

What's the best way to evaluate this expression and get a color value as a result that I can use in my custom table?

Thanks,

Seb.

Community Browser