<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Evaluating background color expression in pivot table in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Evaluating-background-color-expression-in-pivot-table/m-p/1214294#M6248</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the Capabilities API to get the model of a pivot table and build a custom JS table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;app.getObject('domID', objID).then(function(model){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Parse model and build custom table&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The pivot table has 3 measures and each measure has a background color expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;qFallbackTitle = "if(value &amp;gt; 20, green(), red())"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seb.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Feb 2017 07:38:43 GMT</pubDate>
    <dc:creator>sebastian_serva</dc:creator>
    <dc:date>2017-02-17T07:38:43Z</dc:date>
    <item>
      <title>Evaluating background color expression in pivot table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Evaluating-background-color-expression-in-pivot-table/m-p/1214294#M6248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the Capabilities API to get the model of a pivot table and build a custom JS table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;app.getObject('domID', objID).then(function(model){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Parse model and build custom table&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The pivot table has 3 measures and each measure has a background color expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;qFallbackTitle = "if(value &amp;gt; 20, green(), red())"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seb.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 07:38:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Evaluating-background-color-expression-in-pivot-table/m-p/1214294#M6248</guid>
      <dc:creator>sebastian_serva</dc:creator>
      <dc:date>2017-02-17T07:38:43Z</dc:date>
    </item>
  </channel>
</rss>

