<?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 enigmaModel accesible for a second app in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/enigmaModel-accesible-for-a-second-app/m-p/61845#M887</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear colleagues&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use enigmaModel in an extension to update some values of the currentApp and others, with limited success.&lt;/P&gt;&lt;P&gt;I can use the enigmaModel.engineApp methods for the current app.&lt;/P&gt;&lt;P&gt;But when I try to open a second app and update the same values for this new app it does not works the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying this for the second app:&lt;/P&gt;&lt;P&gt;var &lt;STRONG&gt;config&lt;/STRONG&gt; = {&lt;/P&gt;&lt;P&gt;host: window.location.hostname,&lt;/P&gt;&lt;P&gt;prefix: "/",&lt;/P&gt;&lt;P&gt;port: window.location.port,&lt;/P&gt;&lt;P&gt;isSecure: window.location.protocol === "https:",&lt;/P&gt;&lt;P&gt;identity: 'mymachine/administrator' (this is the services owner )&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;//THIS &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;2f6622a8-43e1-4207-b8c7-33d645dec81a&lt;/SPAN&gt; CORRESPONDS TO A DIFFERENT APP THAN THE OPENED ONE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var &lt;STRONG&gt;newApp&lt;/STRONG&gt; = &lt;SPAN style="color: #0000ff;"&gt;qlik.openApp('2f6622a8-43e1-4207-b8c7-33d645dec81a&lt;/SPAN&gt;',&lt;STRONG&gt;config&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that I can show all the content of the second newApp, I can see in the browser console all the elements, included enigmaModel and engineApp--&amp;gt; &lt;SPAN style="color: #339966;"&gt;console.log(newApp) &lt;STRONG&gt;Works&lt;/STRONG&gt;!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But I can't use the methods included in the enigmaModel of the other app even when I open it successfully, like enigmaModel.engineApp.cloneObject&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And &lt;SPAN style="color: #ff0000;"&gt;console.log(newApp.enigmaModel) --&amp;gt;just shows &lt;STRONG&gt;undefined&lt;/STRONG&gt;&lt;/SPAN&gt;, even when the console.log(newApp) shows all the content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 20 May 2018 16:04:57 GMT</pubDate>
    <dc:creator>IVAN-FELIPE</dc:creator>
    <dc:date>2018-05-20T16:04:57Z</dc:date>
    <item>
      <title>enigmaModel accesible for a second app</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/enigmaModel-accesible-for-a-second-app/m-p/61845#M887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear colleagues&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use enigmaModel in an extension to update some values of the currentApp and others, with limited success.&lt;/P&gt;&lt;P&gt;I can use the enigmaModel.engineApp methods for the current app.&lt;/P&gt;&lt;P&gt;But when I try to open a second app and update the same values for this new app it does not works the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying this for the second app:&lt;/P&gt;&lt;P&gt;var &lt;STRONG&gt;config&lt;/STRONG&gt; = {&lt;/P&gt;&lt;P&gt;host: window.location.hostname,&lt;/P&gt;&lt;P&gt;prefix: "/",&lt;/P&gt;&lt;P&gt;port: window.location.port,&lt;/P&gt;&lt;P&gt;isSecure: window.location.protocol === "https:",&lt;/P&gt;&lt;P&gt;identity: 'mymachine/administrator' (this is the services owner )&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;//THIS &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;2f6622a8-43e1-4207-b8c7-33d645dec81a&lt;/SPAN&gt; CORRESPONDS TO A DIFFERENT APP THAN THE OPENED ONE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var &lt;STRONG&gt;newApp&lt;/STRONG&gt; = &lt;SPAN style="color: #0000ff;"&gt;qlik.openApp('2f6622a8-43e1-4207-b8c7-33d645dec81a&lt;/SPAN&gt;',&lt;STRONG&gt;config&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that I can show all the content of the second newApp, I can see in the browser console all the elements, included enigmaModel and engineApp--&amp;gt; &lt;SPAN style="color: #339966;"&gt;console.log(newApp) &lt;STRONG&gt;Works&lt;/STRONG&gt;!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But I can't use the methods included in the enigmaModel of the other app even when I open it successfully, like enigmaModel.engineApp.cloneObject&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And &lt;SPAN style="color: #ff0000;"&gt;console.log(newApp.enigmaModel) --&amp;gt;just shows &lt;STRONG&gt;undefined&lt;/STRONG&gt;&lt;/SPAN&gt;, even when the console.log(newApp) shows all the content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 May 2018 16:04:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/enigmaModel-accesible-for-a-second-app/m-p/61845#M887</guid>
      <dc:creator>IVAN-FELIPE</dc:creator>
      <dc:date>2018-05-20T16:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: enigmaModel accesible for a second app</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/enigmaModel-accesible-for-a-second-app/m-p/61846#M888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/10189"&gt;ife&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most probably the synchronous openApp method didn't manage to fill the property with enigmaModel, try to wrap your code with&amp;nbsp; &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;app.model.waitForOpen.promise.then(()=&amp;gt;{....}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The enigma model is not exposed/ documented/supported, I strongly advise you not to use it. What are you trying to achieve? what enigmaModel API do you need?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2018 05:56:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/enigmaModel-accesible-for-a-second-app/m-p/61846#M888</guid>
      <dc:creator>Aiham_Azmeh</dc:creator>
      <dc:date>2018-05-21T05:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: enigmaModel accesible for a second app</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/enigmaModel-accesible-for-a-second-app/m-p/61847#M889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a log Aiham, this works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working with enigmaModel.engineApp for updating global items in several apps when needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was just a problem of time to refresh and your suggestion fixed it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2018 08:49:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/enigmaModel-accesible-for-a-second-app/m-p/61847#M889</guid>
      <dc:creator>IVAN-FELIPE</dc:creator>
      <dc:date>2018-05-21T08:49:32Z</dc:date>
    </item>
  </channel>
</rss>

