0 Replies Latest reply: Feb 17, 2017 2:38 AM by Sebastian Servat RSS

    Evaluating background color expression in pivot table

    Sebastian Servat

      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?