<?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 getContent method and callback function in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/getContent-method-and-callback-function/m-p/1393546#M8445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;I've been working on an extension that loads some values from variables and uses those values to decide which functions to run etc. To get those values from variables I used getContent method ( &lt;A href="http://help.qlik.com/en-US/sense-developer/September2017/Subsystems/APIs/Content/CapabilityAPIs/VariableAPI/getContent-variable-method.htm" target="_blank"&gt;&lt;SPAN style="font-family: inherit; color: #3778c7;"&gt;getContent method ‒ Qlik Sense Developers&lt;/SPAN&gt;&lt;/A&gt; ). It worked fine on Qlik Sense desktop version but I ran into problems when I tried the extension on Qlik sense enterprise. The problem is that the callback function doesn't get the value from getContent method before the value is used. The functions are structured like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;app.variable.getContent(variablename1, function(reply1){&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.variable.getContent(variablename2, function(reply2){&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FunctionX(reply1, reply2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;I also tried to use promises to solve this but these attempts were unsuccessful though. Can someone help me with this issue? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Nov 2017 10:57:12 GMT</pubDate>
    <dc:creator>alandjoe</dc:creator>
    <dc:date>2017-11-29T10:57:12Z</dc:date>
    <item>
      <title>getContent method and callback function</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/getContent-method-and-callback-function/m-p/1393546#M8445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;I've been working on an extension that loads some values from variables and uses those values to decide which functions to run etc. To get those values from variables I used getContent method ( &lt;A href="http://help.qlik.com/en-US/sense-developer/September2017/Subsystems/APIs/Content/CapabilityAPIs/VariableAPI/getContent-variable-method.htm" target="_blank"&gt;&lt;SPAN style="font-family: inherit; color: #3778c7;"&gt;getContent method ‒ Qlik Sense Developers&lt;/SPAN&gt;&lt;/A&gt; ). It worked fine on Qlik Sense desktop version but I ran into problems when I tried the extension on Qlik sense enterprise. The problem is that the callback function doesn't get the value from getContent method before the value is used. The functions are structured like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;app.variable.getContent(variablename1, function(reply1){&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.variable.getContent(variablename2, function(reply2){&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FunctionX(reply1, reply2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica Neue'; color: #3d3d3d;"&gt;I also tried to use promises to solve this but these attempts were unsuccessful though. Can someone help me with this issue? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 10:57:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/getContent-method-and-callback-function/m-p/1393546#M8445</guid>
      <dc:creator>alandjoe</dc:creator>
      <dc:date>2017-11-29T10:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: getContent method and callback function</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/getContent-method-and-callback-function/m-p/1393547#M8446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't use getContent in an extension, add a property instead, and use the variable in the property panel. Qlik client will then solve the problems with asynchronity for you.&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, 29 Nov 2017 13:12:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/getContent-method-and-callback-function/m-p/1393547#M8446</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2017-11-29T13:12:23Z</dc:date>
    </item>
  </channel>
</rss>

