<?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: Get possible count in Mashup in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Get-possible-count-in-Mashup/m-p/2076838#M18617</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/60840"&gt;@davidmartinezvazquez&lt;/a&gt;&amp;nbsp;, you can use createGenericObject method from CapabilityAPIs for evaluating your Qlik Sense expression directly in the mashup. This allows you to have the same result of GetPossibleCount execute in Qlik Sense app.&lt;/P&gt;
&lt;P&gt;Below an example. Any time the selections will change, you will receive the reply and you can handle the new value. Keep in mind to destroy the session object as soon as you don't need it anymore.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;var app = qlik.openApp('cd5a3779-1d36-45c8-a343-12552755914c', config);
	
app.createGenericObject( {
	  text: {
		qStringExpression: "=GetPossibleCount(Date)"
	  }
	}, ( reply) =&amp;gt; {
	  console.log(reply)
	  //app.destroySessionObject(reply.qInfo.qId)
});&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 May 2023 14:00:00 GMT</pubDate>
    <dc:creator>alex_colombo</dc:creator>
    <dc:date>2023-05-26T14:00:00Z</dc:date>
    <item>
      <title>Get possible count in Mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Get-possible-count-in-Mashup/m-p/2076137#M18603</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to get the possible values of a field in a mashup.&lt;/P&gt;
&lt;P&gt;Using &lt;EM&gt;console.log(app.field("field name").getData())&lt;/EM&gt; I can see that there is an object named stateCounts that has the info i need (qOptions), but i cant get it.&lt;/P&gt;
&lt;P&gt;Tried app.field("fieldname").getData().stateCounts but it returns undefined. &lt;/P&gt;
&lt;P&gt;Is there a way to get that information?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 10:15:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Get-possible-count-in-Mashup/m-p/2076137#M18603</guid>
      <dc:creator>davidmartinezvazquez</dc:creator>
      <dc:date>2023-05-25T10:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Get possible count in Mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Get-possible-count-in-Mashup/m-p/2076838#M18617</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/60840"&gt;@davidmartinezvazquez&lt;/a&gt;&amp;nbsp;, you can use createGenericObject method from CapabilityAPIs for evaluating your Qlik Sense expression directly in the mashup. This allows you to have the same result of GetPossibleCount execute in Qlik Sense app.&lt;/P&gt;
&lt;P&gt;Below an example. Any time the selections will change, you will receive the reply and you can handle the new value. Keep in mind to destroy the session object as soon as you don't need it anymore.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;var app = qlik.openApp('cd5a3779-1d36-45c8-a343-12552755914c', config);
	
app.createGenericObject( {
	  text: {
		qStringExpression: "=GetPossibleCount(Date)"
	  }
	}, ( reply) =&amp;gt; {
	  console.log(reply)
	  //app.destroySessionObject(reply.qInfo.qId)
});&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 14:00:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Get-possible-count-in-Mashup/m-p/2076838#M18617</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2023-05-26T14:00:00Z</dc:date>
    </item>
  </channel>
</rss>

