<?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: Qlik Sense API read possible values of a specific field? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-API-read-possible-values-of-a-specific-field/m-p/1254280#M6804</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually when you call getData on the field interface a ListObject is created in the background for you but you could use the createList method, the full ListObject definition can be found here: &lt;A href="http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/EngineAPI/Content/GenericObject/PropertyLevel/ListObjectDef.htm" title="http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/EngineAPI/Content/GenericObject/PropertyLevel/ListObjectDef.htm"&gt;http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/EngineAPI/Content/GenericObject/PropertyLevel/ListObjectDef.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some code:&lt;/P&gt;&lt;P&gt;app.createList({&lt;/P&gt;&lt;P&gt;&amp;nbsp; qListObjectDef: {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; qDef: { qFieldDefs: ['SomeField'] }&lt;/P&gt;&lt;P&gt;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;&amp;nbsp; qInitialDataFetch: [{ qTop: 0, qLeft: 0, qWidth: 0, qHeight: 10000 }]&lt;/P&gt;&lt;P&gt;})&lt;/P&gt;&lt;P&gt;.then(function(model) { console.log(model) })&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jan 2017 16:03:34 GMT</pubDate>
    <dc:creator>Alexander_Thor</dc:creator>
    <dc:date>2017-01-16T16:03:34Z</dc:date>
    <item>
      <title>Qlik Sense API read possible values of a specific field?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-API-read-possible-values-of-a-specific-field/m-p/1254277#M6801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to everyone,&lt;/P&gt;&lt;P&gt;I'm looking for a javascript sample to read the possible values of a specific field using qlik sense 3.1 java script.&lt;/P&gt;&lt;P&gt;I have try to use the field getData method but this return all data, not only the possibile data according to the current selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the sample code I have tested :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;var app = qlik.currApp(this);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;var fieldData = app.field("CustomerName").getData(20, "V");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;for (t=0; t&amp;lt;fieldData.rows.length; t++)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("Value = [ " + fieldData.rows&lt;T&gt;.qText + " ]");&lt;/T&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking for a java script code with the same functionality as the following VBS code I have used with QlikView :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;Set fullList = ActiveDocument.Fields("CustomerName").GetPossibleValues&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: 'courier new', courier;"&gt;For t = 0 to fullList.Count - 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call MsgBox("Value = " &amp;amp; fullList.item(t).Text)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;Next&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone could help me please?&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2017 13:41:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-API-read-possible-values-of-a-specific-field/m-p/1254277#M6801</guid>
      <dc:creator />
      <dc:date>2017-01-16T13:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense API read possible values of a specific field?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-API-read-possible-values-of-a-specific-field/m-p/1254278#M6802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two constructs within QIX that you can use.&lt;/P&gt;&lt;P&gt;Either the ListObject which reads the state vectors of a field and returns the full data set, i.e selected, optional and excluded values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you can use a HyperCube construct which is part of calculation layer which only returns Selected and Optional values. In the Capabilities API you can use the createCube method to create a HyperCube that would contain a dimension which lists the field you want to fetch values for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some pseudo code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14845792049645552 jive_text_macro" jivemacro_uid="_14845792049645552"&gt;
&lt;P&gt;&amp;nbsp; app.createCube({&lt;/P&gt;
&lt;P&gt;&amp;nbsp; qDimensions: [{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; qDef: { qFieldDefs: ['Dim1'] }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; qInitialDataFetch: [{ qTop: 0, qLeft: 0, qWidth: 1, qHeight: 10000 }]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; })&lt;/P&gt;
&lt;P&gt;&amp;nbsp; .then(function(model) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; model.Validated.bind(function() {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // HyperCube has been updated&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(model.layout)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; })&lt;/P&gt;
&lt;P&gt;&amp;nbsp; console.log(model.qHyperCube.qDataPages)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; })&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or as a interactive fiddle: &lt;A href="https://jsfiddle.net/mindspank/mzygdv04/" title="https://jsfiddle.net/mindspank/mzygdv04/"&gt;Getting a single field - JSFiddle&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2017 15:07:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-API-read-possible-values-of-a-specific-field/m-p/1254278#M6802</guid>
      <dc:creator>Alexander_Thor</dc:creator>
      <dc:date>2017-01-16T15:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense API read possible values of a specific field?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-API-read-possible-values-of-a-specific-field/m-p/1254279#M6803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexander,&lt;/P&gt;&lt;P&gt;many thanks for you answer. Do you have a code example also for the first construct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;1# construct - "Either the ListObject which reads the state vectors of a field and returns the full data set, i.e selected, optional and excluded values."&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2017 15:53:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-API-read-possible-values-of-a-specific-field/m-p/1254279#M6803</guid>
      <dc:creator />
      <dc:date>2017-01-16T15:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense API read possible values of a specific field?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-API-read-possible-values-of-a-specific-field/m-p/1254280#M6804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually when you call getData on the field interface a ListObject is created in the background for you but you could use the createList method, the full ListObject definition can be found here: &lt;A href="http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/EngineAPI/Content/GenericObject/PropertyLevel/ListObjectDef.htm" title="http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/EngineAPI/Content/GenericObject/PropertyLevel/ListObjectDef.htm"&gt;http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/EngineAPI/Content/GenericObject/PropertyLevel/ListObjectDef.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some code:&lt;/P&gt;&lt;P&gt;app.createList({&lt;/P&gt;&lt;P&gt;&amp;nbsp; qListObjectDef: {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; qDef: { qFieldDefs: ['SomeField'] }&lt;/P&gt;&lt;P&gt;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;&amp;nbsp; qInitialDataFetch: [{ qTop: 0, qLeft: 0, qWidth: 0, qHeight: 10000 }]&lt;/P&gt;&lt;P&gt;})&lt;/P&gt;&lt;P&gt;.then(function(model) { console.log(model) })&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2017 16:03:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-API-read-possible-values-of-a-specific-field/m-p/1254280#M6804</guid>
      <dc:creator>Alexander_Thor</dc:creator>
      <dc:date>2017-01-16T16:03:34Z</dc:date>
    </item>
  </channel>
</rss>

