<?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: Filtering by a custom expression using the Engine API? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1848771#M15755</link>
    <description>&lt;P&gt;Thanks, that was the missing piece, it works now &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Oct 2021 11:02:34 GMT</pubDate>
    <dc:creator>master_t</dc:creator>
    <dc:date>2021-10-19T11:02:34Z</dc:date>
    <item>
      <title>Filtering by a custom expression using the Engine API?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1839687#M15623</link>
      <description>&lt;P&gt;Hello fellow developers, I have a question about how to reproduce a QS behavior using the Engine API / .NET SDK.&lt;/P&gt;&lt;P&gt;When interacting with a Qlik Sense app using the browser, we can apply "custom" selections that are not tied to a specific app field, but instead use a custom expression, like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="master_t_0-1632826168895.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/62881i5E51B021A566AD5D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="master_t_0-1632826168895.png" alt="master_t_0-1632826168895.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this case, as you can see, we're applying a selection to the calculated expression &lt;FONT face="courier new,courier"&gt;Year([SomeField])&lt;/FONT&gt;, but the question applies to any expression.&lt;/P&gt;&lt;P&gt;In the browser this can be done in a variety of ways, for example by creating a Filter Pane object and setting the custom expression we want to filter as its Dimension, or by clicking on a cell in a table that has the custom expression as one of its dimensions.&lt;/P&gt;&lt;P&gt;What I want to do is apply a selection to a custom expression like that using the .NET SDK (in other words: the Engine API). Is it possible? What is the easiest way to accomplish this?&lt;/P&gt;&lt;P&gt;I found out that you can user the .SelectHypercubeValues() method of a GenericObject, however this requires referencing a specific (and already existing) object. Can it be done some other way? I would like not having to rely on an already existing object in the app, since I want the method I'm implementing to work on any app.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:41:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1839687#M15623</guid>
      <dc:creator>master_t</dc:creator>
      <dc:date>2024-11-15T23:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering by a custom expression using the Engine API?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1839713#M15624</link>
      <description>&lt;P&gt;I think it's this endpoint you are looking for: &lt;A href="https://help.qlik.com/en-US/sense-developer/August2021/Subsystems/EngineJSONAPI/Content/service-genericobject-searchlistobjectfor.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/August2021/Subsystems/EngineJSONAPI/Content/service-genericobject-searchlistobjectfor.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Or for the .NET version: &lt;A href="https://help.qlik.com/en-US/sense-developer/August2021/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IGenericObject.SearchListObjectFor.htm#Qlik_Engine_IGenericObject_SearchListObjectFor_System_String_System_String_" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/August2021/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IGenericObject.SearchListObjectFor.htm#Qlik_Engine_IGenericObject_SearchListObjectFor_System_String_System_String_&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 12:17:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1839713#M15624</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2021-09-28T12:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering by a custom expression using the Engine API?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1839714#M15625</link>
      <description>&lt;P&gt;Thanks for the info, however this still requires having an existing ListObject to work with, while I wanted to write a more generic method. Should my approach be creating a ListObject on the fly? I see there's a "CreateGenericSessionObject" method, I assume that might work? Can it be invoked with an analyzer license, since it is temporary and not really editing the app? Or does it still require Professional access?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 12:26:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1839714#M15625</guid>
      <dc:creator>master_t</dc:creator>
      <dc:date>2021-09-28T12:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering by a custom expression using the Engine API?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1839960#M15630</link>
      <description>&lt;P&gt;Yes. exactly. Create a session object and put a ListObjectDef property in it! That's what the client does when you press that search icon in a visualization. That part works also for analyzer licenses, otherwise you wouldn't be able to search in visualizations!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 06:46:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1839960#M15630</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2021-09-29T06:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering by a custom expression using the Engine API?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1840063#M15633</link>
      <description>&lt;P&gt;Thanks, I will try this approach.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 11:04:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1840063#M15633</guid>
      <dc:creator>master_t</dc:creator>
      <dc:date>2021-09-29T11:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering by a custom expression using the Engine API?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1848287#M15750</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41242"&gt;@Øystein_Kolsrud&lt;/a&gt;&amp;nbsp; well, I've been trying this, but I'm having no luck, maybe you will be so kind to help me out again &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've written this code, as best I could based on your suggestions:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Listbox listBoxObj = app.CreateGenericSessionObject(new ListboxProperties()
{
    ListObjectDef = new ListboxListObjectDef()
    {
        Def = new ListboxListObjectDimensionDef { FieldDefs = new string[] { "my custom field expression" } },
        InitialDataFetch = new NxPage[] { new NxPage { Height = 10000, Left = 0, Top = 0, Width = 1 } },
    },
    Info = new NxInfo() { Type = "listbox" }
}) as Listbox;

listBoxObj.SearchListObjectFor("/qListObjectDef", "search expression");&lt;/LI-CODE&gt;&lt;P&gt;However, the &lt;FONT face="courier new,courier"&gt;SearchListObjectFor()&lt;/FONT&gt; method this seems to do absolutely nothing.&lt;/P&gt;&lt;P&gt;I know the listbox is correctly defined and the selections are working, because if I select directly using the element number, like this:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;listBoxObj.SelectListObjectValues("/qListObjectDef", new[] {1}, false);&lt;/LI-CODE&gt;&lt;P&gt;selections work and I can see them reflected in the frontend. But with the expression-based search I'm having no luck.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Note that I've used "ListboxProperties/ListboxListObjectDimensionDef " for the definition, because I couldn't find a way to use&amp;nbsp;&lt;SPAN&gt;ListObjectDef&amp;nbsp;directly, maybe that's the problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 15:50:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1848287#M15750</guid>
      <dc:creator>master_t</dc:creator>
      <dc:date>2021-10-18T15:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering by a custom expression using the Engine API?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1848326#M15751</link>
      <description>&lt;P&gt;I've never used that endpoint myself so I'm not 100% sure how it works, but I think you need to call the method "AcceptListObjectSearch" to "commit" your selection. There is an example of how this works here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/August2021/Subsystems/EngineAPI/Content/Sense_EngineAPI/DiscoveringAndAnalysing/SearchInData/accept-results-search-list-object.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/August2021/Subsystems/EngineAPI/Content/Sense_EngineAPI/DiscoveringAndAnalysing/SearchInData/accept-results-search-list-object.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 17:02:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1848326#M15751</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2021-10-18T17:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering by a custom expression using the Engine API?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1848632#M15754</link>
      <description>&lt;P&gt;And using the Listbox class here should be just fine, but if you want to avoid the client classes, then you'll find an example on how to only use the engine namespace for this here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/kolsrud/qlik-dot-net-sdk-hypercube-usage/blob/master/HypercubeUsage/Program.cs#L58" target="_blank" rel="noopener"&gt;https://github.com/kolsrud/qlik-dot-net-sdk-hypercube-usage/blob/master/HypercubeUsage/Program.cs#L58&lt;/A&gt;&lt;/P&gt;&lt;P&gt;That example shows how to add a hypercube to a GenericObjectProperties instance, but it's the same thing for ListObject-instances apart from the name of the property which needs to be "qListObjectDef" if you're adding a list object.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 09:47:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1848632#M15754</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2021-10-19T09:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering by a custom expression using the Engine API?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1848771#M15755</link>
      <description>&lt;P&gt;Thanks, that was the missing piece, it works now &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 11:02:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Filtering-by-a-custom-expression-using-the-Engine-API/m-p/1848771#M15755</guid>
      <dc:creator>master_t</dc:creator>
      <dc:date>2021-10-19T11:02:34Z</dc:date>
    </item>
  </channel>
</rss>

