<?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: Accessing relationship between qElemNumber and actual field Value in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1780762#M13803</link>
    <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp;.&amp;nbsp; &amp;nbsp; Conceptually, I understand what you're telling me, that the hypercube object is not the appropriate way to access/filter the data, and that a list object is, since I can use that SelectListObjectValues function.&amp;nbsp; Dumb follow-up question, how does one create a list object?&amp;nbsp; Is this something that I can transform from they hypercube object, or is this something I need to set in an app's sheet or visualization so that the API recognizes it as a list object type?&amp;nbsp; I've tried reading the documents but I still haven't figured out how to define the list object and whether that can be done from data in a hyper cube.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Feb 2021 02:42:13 GMT</pubDate>
    <dc:creator>beatYesterday</dc:creator>
    <dc:date>2021-02-08T02:42:13Z</dc:date>
    <item>
      <title>Accessing relationship between qElemNumber and actual field Value</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1768724#M13647</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Very new to Qliksense and its engine API.&amp;nbsp; I'm ultimately trying to filter(select) a subset of rows based on the value contained within a specific column.&amp;nbsp; I have found the&amp;nbsp; &lt;A href="https://help.qlik.com/en-US/sense-developer/June2020/apis/EngineAPI/services-GenericObject-SelectHyperCubeValues.html" target="_blank" rel="noopener"&gt;https://help.qlik.com/en-US/sense-developer/June2020/apis/EngineAPI/services-GenericObject-SelectHyperCubeValues.html&lt;/A&gt;&amp;nbsp;method, which allows you to filter base don qElemNumber and dimension array key.&amp;nbsp; This is fine, but there is significant guess work that would need to go into figuring out which qElemNumber is assigned to a specific&amp;nbsp;field value.&amp;nbsp; For example, if 'US' was the field value, how do I know if it is assigned qElemNumber 1, 2, 3,4 or something else?&lt;/P&gt;&lt;P&gt;Is there a method that allows me to filter/select by the actual field value?&lt;/P&gt;&lt;P&gt;If not, how do people typically structure API calls for selections that allow you to filter/select based on the column values themselves?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 20:08:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1768724#M13647</guid>
      <dc:creator>beatYesterday</dc:creator>
      <dc:date>2020-12-15T20:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing relationship between qElemNumber and actual field Value</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1774107#M13700</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm still stuck with this one and would appreciate any guidance from the community.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 15:21:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1774107#M13700</guid>
      <dc:creator>beatYesterday</dc:creator>
      <dc:date>2021-01-13T15:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing relationship between qElemNumber and actual field Value</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1780239#M13796</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;This method was created for building visualizations - where the data will be represented by clickable labels (data fetch with getLayout for example)&lt;BR /&gt;This is not optimal for your use case.&lt;/P&gt;&lt;P&gt;You will be better off with SelectListObjectValues&amp;nbsp;&lt;A href="https://qlik.dev/apis/json-rpc/qix/genericobject#%23%2Fentries%2FGenericObject%2Fentries%2FSelectListObjectValues" target="_blank"&gt;https://qlik.dev/apis/json-rpc/qix/genericobject#%23%2Fentries%2FGenericObject%2Fentries%2FSelectListObjectValues&lt;/A&gt;&lt;/P&gt;&lt;P&gt;so: create a list (instead of a cube) =&amp;gt; do selections with “values”&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 15:14:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1780239#M13796</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2021-02-04T15:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing relationship between qElemNumber and actual field Value</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1780762#M13803</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp;.&amp;nbsp; &amp;nbsp; Conceptually, I understand what you're telling me, that the hypercube object is not the appropriate way to access/filter the data, and that a list object is, since I can use that SelectListObjectValues function.&amp;nbsp; Dumb follow-up question, how does one create a list object?&amp;nbsp; Is this something that I can transform from they hypercube object, or is this something I need to set in an app's sheet or visualization so that the API recognizes it as a list object type?&amp;nbsp; I've tried reading the documents but I still haven't figured out how to define the list object and whether that can be done from data in a hyper cube.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 02:42:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1780762#M13803</guid>
      <dc:creator>beatYesterday</dc:creator>
      <dc:date>2021-02-08T02:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing relationship between qElemNumber and actual field Value</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1781687#M13815</link>
      <description>&lt;P&gt;You can read a bit more about qListObject at this link:&lt;BR /&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/November2020/Subsystems/Extensions/Content/Sense_Extensions/Overview/generic-object.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/November2020/Subsystems/Extensions/Content/Sense_Extensions/Overview/generic-object.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can create a list object:&lt;/P&gt;&lt;P&gt;- with the capability API:&amp;nbsp; &lt;A href="https://help.qlik.com/en-US/sense-developer/November2020/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/AppAPI/createList-method.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/November2020/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/AppAPI/createList-method.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;- or with the Engine API (CreateObject or CreateSessionObject method and specify qType:"listObject")&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 15:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1781687#M13815</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2021-02-10T15:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing relationship between qElemNumber and actual field Value</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1783601#M13860</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp;, I'm still not getting it.&amp;nbsp; I've read the documents and can create a list object from scratch using the examples shown here,&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/sense-developer/November2020/Subsystems/EngineAPI/Content/Sense_EngineAPI/WorkingWithAppsAndVisualizations/CreateVisualizations/create-listObject.htm" target="_blank" rel="noopener"&gt;https://help.qlik.com/en-US/sense-developer/November2020/Subsystems/EngineAPI/Content/Sense_EngineAPI/WorkingWithAppsAndVisualizations/CreateVisualizations/create-listObject.htm&lt;/A&gt;&amp;nbsp;. However, I have not yet found a way to load the list object with data from my existing app.&amp;nbsp; Is there any guidance or tutorial that you could point me to towards this end?&amp;nbsp; Ideally, I'd be able to create a list object from either a Hypercube or table object.&amp;nbsp; Is that possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally, can you confirm that the SelectListObjectValues actually uses the visible values in Qlik and not the element numbers?&amp;nbsp; The documentation says that it uses element numbers, not the values themselves.&amp;nbsp; So, even if I did get this to work I'm not sure I'd be able to filter by the actual value in a field that a user sees.&amp;nbsp; Is there a means to get the mapping between element number and actual value of a field?&amp;nbsp; Any guidance here would be very helpful.&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 21:19:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1783601#M13860</guid>
      <dc:creator>beatYesterday</dc:creator>
      <dc:date>2021-02-17T21:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing relationship between qElemNumber and actual field Value</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1783602#M13861</link>
      <description>&lt;P&gt;Glad you brought this up. Having a similar issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 21:25:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1783602#M13861</guid>
      <dc:creator>QuickDelivery12</dc:creator>
      <dc:date>2021-02-17T21:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing relationship between qElemNumber and actual field Value</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1783603#M13862</link>
      <description>&lt;P&gt;Glad you brought this up, having a similar issue.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 21:26:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1783603#M13862</guid>
      <dc:creator>QuickDelivery12</dc:creator>
      <dc:date>2021-02-17T21:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing relationship between qElemNumber and actual field Value</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1783696#M13864</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/131629"&gt;@beatYesterday&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Hi, maybe this tutorial can help&amp;nbsp;&lt;A href="http://opensrc.axisgroup.com/tutorials/engine/107.%20Creating%20Filters%20with%20ListObjects.html" target="_blank"&gt;http://opensrc.axisgroup.com/tutorials/engine/107.%20Creating%20Filters%20with%20ListObjects.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The `SelectListObjectValues` uses element numbers, the method name is, unfortunately, a little bit confusing.&lt;BR /&gt;I suggest you use the Field API's `selectValues` for your use case&amp;nbsp;&lt;A href="https://qlik.dev/apis/json-rpc/qix/field#%23%2Fentries%2FField%2Fentries%2FSelectValues" target="_blank"&gt;https://qlik.dev/apis/json-rpc/qix/field#%23%2Fentries%2FField%2Fentries%2FSelectValues&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 07:12:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1783696#M13864</guid>
      <dc:creator>Aiham_Azmeh</dc:creator>
      <dc:date>2021-02-18T07:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing relationship between qElemNumber and actual field Value</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1787657#M13949</link>
      <description>&lt;P&gt;I have finally created the solution I was aiming for and am following back to pass what I learned to others that may be experiencing the same issue.&amp;nbsp; Again, I'm using python and executed the following JSON commands to the ENGINE API while using the websocket, ssl, datetime and json Python libraries.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp;was correct that the SelectValues method is a way to select values in a field based on the actual human-visible value (i.e. not the ElemNumber).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The steps needed to do this successfully involve connecting to the relevant app in Engine API.&amp;nbsp; Then you must select the field that you want to filter on.&amp;nbsp; This is accomplished using the JSON below&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import websocket
import ssl
import json
import datetime
ws = websocket.create_connection(url, sslopt = certs, header = wsHeaders)

ws.send(json.dumps({
    "handle": 1, #//always handle 1 since this is an app-level method
    "method": "GetField",
    "params": {
        "qFieldName": "QLIK_FIELD_NAME_HERE",#//field name in App to filter on
        "qStateName": ""
    }
}))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will return the object.&amp;nbsp; Next you will need to send the SelectValues method with attributes needed.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;dicts =  {"qText": "Company A", "qIsNumeric": False, "qNumber": 0},{"qText": "Company B","qIsNumeric": False,"qNumber": 0}

ws.send(json.dumps(
    {
    "handle": HANDLE_RETURNED_FROM_GetField,
    "method": "SelectValues",
    "params": {
        "qFieldValues":dicts,
        "qToggleMode": False,
        "qSoftLock": False
    }
}
    ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will work for fields that are strings.&amp;nbsp; The above &lt;U&gt;will not work for numeric or date fields&lt;/U&gt;.&amp;nbsp; To select values for these fields the qIsNumberic must be set to True, and the qNumber is where you send the numeric value to be selected.&amp;nbsp; For example, if I wanted to select the values 1 and 2 from a field containing the numbers 1-10, I would use the following:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#filtering for numeric values
dicts =  {"qText": "", "qIsNumeric": True, "qNumber": 1},{"qText": "","qIsNumeric": True,"qNumber": 2}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date filters are selected the same way that numeric fields are, since Qlik stores these as numbers (in the same way that Excel does).&amp;nbsp; In order to go from a date string to the same numeric value I use the code below&lt;/P&gt;&lt;LI-CODE lang="python"&gt;time_diff = (datetime.datetime.strptime(string_date, '%Y-%m-%d') - datetime.datetime.strptime('1899-12-30', '%Y-%m-%d'))

#convert time diff object to a float
date_num = time_diff / datetime.timedelta(days = 1)

dicts =  {"qText": "", "qIsNumeric": True, "qNumber": date_num }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 21:28:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-relationship-between-qElemNumber-and-actual-field/m-p/1787657#M13949</guid>
      <dc:creator>beatYesterday</dc:creator>
      <dc:date>2021-03-02T21:28:37Z</dc:date>
    </item>
  </channel>
</rss>

