<?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 Re: evaluate string in table in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/evaluate-string-in-table/m-p/1369072#M8020</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What release are you refering to? In September 2017 it is still available at&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.backendApi.model.enigmaModel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Nov 2017 12:40:43 GMT</pubDate>
    <dc:creator>ErikWetterberg</dc:creator>
    <dc:date>2017-11-01T12:40:43Z</dc:date>
    <item>
      <title>evaluate string in table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/evaluate-string-in-table/m-p/1369069#M8017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to dynamically evaluate a string I got from a table in a Qlik Extension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The story: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I retrieve a hypercube&lt;/P&gt;&lt;P&gt;2. In the hypercubematrix one column in a row contains a formula: e.g. =left('Qlik is Great',4)&lt;/P&gt;&lt;P&gt;I would like to have the formula evaluated in the extension at runtime.&lt;/P&gt;&lt;P&gt;3. The result should be a hypercube with the column evaluated: e.g. 'Qlik'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which api do I need to use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dion&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 07:47:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/evaluate-string-in-table/m-p/1369069#M8017</guid>
      <dc:creator>dionverbeke</dc:creator>
      <dc:date>2017-07-12T07:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: evaluate string in table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/evaluate-string-in-table/m-p/1369070#M8018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dion,&lt;/P&gt;&lt;P&gt;This is kind of tricky... You need to call &lt;A href="http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/EngineAPI/Content/Classes/AppClass/App-class-Evaluate-method.htm"&gt;app.evaluate&lt;/A&gt; to get this done. But this method is not available in the &lt;A href="http://help.qlik.com/en-US/sense-developer/June2017/Subsystems/APIs/Content/CapabilityAPIs/qlik-app-interface.htm"&gt;App AP&lt;/A&gt;I. Instead you need to use &lt;A href="http://help.qlik.com/en-US/sense-developer/June2017/Subsystems/APIs/Content/enigmajs/enigmajs-introduction.htm"&gt;enigma.js&lt;/A&gt;. Since enigma is autogenerated, all methods defined in the engine API are available. Do note that enigma is flagged as experimental, though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In an extension you can find enigma at this.backendApi.model.enigmaModel. That is a reference to the GenericObject wrapper, and in this case you need the app wrapper at &lt;SPAN style="font-size: 13.3333px;"&gt;this.backendApi.model.enigmaModel.app. This means you could do:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14998618434774607 jive_text_macro" jivemacro_uid="_14998618434774607"&gt;
&lt;P&gt;this.backendApi.model.enigmaModel.app.evaluate("1+1").then(function(reply){console.log("got reply",reply)});&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;And you will get a printout like this:&lt;/P&gt;&lt;P&gt;got reply 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik Wetterberg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 12:19:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/evaluate-string-in-table/m-p/1369070#M8018</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2017-07-12T12:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: evaluate string in table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/evaluate-string-in-table/m-p/1369071#M8019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to be carefull, the enigma is only available in newer versions of qlik sense and the path is changed.&lt;/P&gt;&lt;P&gt;In the newest qlik release this is move from .enigmaModel direct to .model&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye Konrad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 12:39:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/evaluate-string-in-table/m-p/1369071#M8019</guid>
      <dc:creator>konrad_mattheis</dc:creator>
      <dc:date>2017-07-12T12:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: evaluate string in table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/evaluate-string-in-table/m-p/1369072#M8020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What release are you refering to? In September 2017 it is still available at&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.backendApi.model.enigmaModel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2017 12:40:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/evaluate-string-in-table/m-p/1369072#M8020</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2017-11-01T12:40:43Z</dc:date>
    </item>
  </channel>
</rss>

