<?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: Make selection / set filter in Qlik Sense App via .NET SDK in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1819025#M15191</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It's late response but it may help someone.&lt;/P&gt;&lt;P&gt;I was searching the solution for filters with multiple value using dotnet and I found the below solutions and It's working fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var fieldLst = new List&amp;lt;FieldValue&amp;gt;();&lt;BR /&gt;foreach (string account in accountArray)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FieldValue fieldValue = new FieldValue();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldValue.IsNumeric = false;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldValue.Text = account;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldLst.Add(fieldValue);&lt;BR /&gt;}&lt;BR /&gt;app.GetField(field).SelectValues(fieldLst, true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Hemik&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jul 2021 08:40:01 GMT</pubDate>
    <dc:creator>Hemik</dc:creator>
    <dc:date>2021-07-01T08:40:01Z</dc:date>
    <item>
      <title>Make selection / set filter in Qlik Sense App via .NET SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179786#M5831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm currently developing an .NET App which should control a QS App (making selections/setting filters etc.).&lt;/P&gt;&lt;P&gt;I'm can read the current made selection in the tool live, which is great but I have troubles making selections via my app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my question is: How can I make a selection / set a filter on my app?&lt;/P&gt;&lt;P&gt;Like setting a Datefilter, a customer filter to a certain customer etc.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14746256323797209 jive_text_macro" jivemacro_uid="_14746256323797209" modifiedtitle="true"&gt;
&lt;P&gt;Dim currentSelection As ICurrentSelection = myApp.GetCurrentSelection&lt;/P&gt;
&lt;P&gt;For Each selectedField In currentSelection.Selections&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;MsgBox("Field: " &amp;amp; selectedField.Field &amp;amp; vbNewLine &amp;amp; "Selected Values: " &amp;amp; selectedField.Selected)&lt;/P&gt;
&lt;P&gt;Next&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you and best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2016 10:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179786#M5831</guid>
      <dc:creator>chrislemm</dc:creator>
      <dc:date>2016-09-23T10:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Make selection / set filter in Qlik Sense App via .NET SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179787#M5832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this should help your:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14753251035115948 jive_text_macro" jivemacro_uid="_14753251035115948"&gt;
&lt;P&gt;myApp.GetField(fielname).Select(filtertext, true);&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye Konrad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Oct 2016 12:31:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179787#M5832</guid>
      <dc:creator>konrad_mattheis</dc:creator>
      <dc:date>2016-10-01T12:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Make selection / set filter in Qlik Sense App via .NET SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179788#M5833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply. That was the solution. I have to admit I found out earlier but I did forgot about that post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I still have the problem to select multiple filters like f.e. years: 2016,2015 etc.&lt;/P&gt;&lt;P&gt;Can I only set a single filter?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 14:40:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179788#M5833</guid>
      <dc:creator>chrislemm</dc:creator>
      <dc:date>2016-10-05T14:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Make selection / set filter in Qlik Sense App via .NET SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179789#M5834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it should work with filtertext = "2016 2015 2014" as example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye Konrad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 13:03:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179789#M5834</guid>
      <dc:creator>konrad_mattheis</dc:creator>
      <dc:date>2016-10-06T13:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Make selection / set filter in Qlik Sense App via .NET SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179790#M5835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not working for me &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;. I tried 2016,2015 etc. -&amp;gt; delets my filter; 2016;2015 -&amp;gt; same; 2016|2015 -&amp;gt; same; 2016 2015 -&amp;gt; same.&lt;BR /&gt;I tried to pass a array to this function, also not working because the parameter is a simple string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 13:07:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179790#M5835</guid>
      <dc:creator>chrislemm</dc:creator>
      <dc:date>2016-10-06T13:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Make selection / set filter in Qlik Sense App via .NET SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179791#M5836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;than you have to go the "hard" way like.&lt;/P&gt;&lt;P&gt;CreateGenericSessionObject as Lisfbox,&lt;/P&gt;&lt;P&gt;Fetch the Data, mark the elements as filtered&lt;/P&gt;&lt;P&gt;Destroy the Object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just take chrome an watch the websocket connection&lt;/P&gt;&lt;P&gt;if you click on a filterbox in the currentselection and&lt;/P&gt;&lt;P&gt;change a filter setting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye Konrad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 09:20:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179791#M5836</guid>
      <dc:creator>konrad_mattheis</dc:creator>
      <dc:date>2016-10-11T09:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Make selection / set filter in Qlik Sense App via .NET SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179792#M5837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sounds like you might want to have a look at this function that makes it possible to select multiple field values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense-developer/3.1/apis/net%20sdk/html/M_Qlik_Engine_IField_SelectValues.htm" title="http://help.qlik.com/en-US/sense-developer/3.1/apis/net%20sdk/html/M_Qlik_Engine_IField_SelectValues.htm"&gt;IField.SelectValues Method&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, there is this section in the documentation for the SDK that gives guidance on how to work with selections:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/NetSDKAPI/Content/WorkWith/Net-Sdk-Work-With-Selections.htm" title="http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/NetSDKAPI/Content/WorkWith/Net-Sdk-Work-With-Selections.htm"&gt;Filtering data with selections ‒ Qlik Sense&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards, Øystein Kolsrud&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 06:51:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179792#M5837</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2016-10-21T06:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Make selection / set filter in Qlik Sense App via .NET SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179793#M5838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to do something more advanced, like selecting ranges of values, then you might want to look into using the AppField concept instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense-developer/3.1/apis/net%20sdk/html/T_Qlik_Sense_Client_IAppField.htm" title="http://help.qlik.com/en-US/sense-developer/3.1/apis/net%20sdk/html/T_Qlik_Sense_Client_IAppField.htm"&gt;http://help.qlik.com/en-US/sense-developer/3.1/apis/net%20sdk/html/T_Qlik_Sense_Client_IAppField.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/NetSDKAPI/Content/WorkWith/Net-Sdk-Work-With-App-Fields.htm" title="http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/NetSDKAPI/Content/WorkWith/Net-Sdk-Work-With-App-Fields.htm"&gt;http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/NetSDKAPI/Content/WorkWith/Net-Sdk-Work-With-App-Fields.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An AppField is a generic object containing a ListObject for a particular filed. That allows you to use the selection mechanisms of generic objects for doing what you want. You can use this method to get an AppField for a particular field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense-developer/3.1/apis/net%20sdk/html/M_Qlik_Sense_Client_AppExtensions_GetAppField.htm" title="http://help.qlik.com/en-US/sense-developer/3.1/apis/net%20sdk/html/M_Qlik_Sense_Client_AppExtensions_GetAppField.htm"&gt;AppExtensions.GetAppField Method&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The AppField object returned by that method provides methods for doing operations on the list box. For instance, this method can be used to select ranges:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense-developer/3.1/apis/net%20sdk/html/M_Qlik_Sense_Client_IAppField_SelectContinuousRange.htm" title="http://help.qlik.com/en-US/sense-developer/3.1/apis/net%20sdk/html/M_Qlik_Sense_Client_IAppField_SelectContinuousRange.htm"&gt;http://help.qlik.com/en-US/sense-developer/3.1/apis/net%20sdk/html/M_Qlik_Sense_Client_IAppField_SelectContinuousRange.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 08:49:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1179793#M5838</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2016-10-21T08:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Make selection / set filter in Qlik Sense App via .NET SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1678249#M12369</link>
      <description>&lt;P&gt;Hi, I know its 4 years late, but I was looking for an answer and stumbled on your inquiry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Multiple values in the field values of a QS selection is an :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;IEnumerable(Of FieldValue)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Your best bet is to have a class, something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Public Class QSSelection
        Public Property fieldname As String
        Public Property fieldvalues As IEnumerable(Of FieldValue)
End Class&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then you can pass the properties to this class (let's suppose you have a Date field in your QS app and you need to apply, let's say, 56 days in the past, starting from today, as selections:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Dim qs_selection as QlikSelection() = New QlikSelection()
qs_selection.fieldname = "Date" 
Dim today = DateTime.Now().Date
Dim firstday = today.AddDays(-56)
Dim datematrix As List(Of Date) = New List(Of Date)
Dim i As Integer
For i = 1 To 56
    datematrix.Add(today.AddDays(-i).ToShortDateString)
Next
qs_selection.fieldvalues = {New FieldValue With {.Text = Nothing, .Number = 0, .IsNumeric = True}}
For Each zi In datematrix    
    qs_selection.fieldvalues = qs_selection.fieldvalues.Concat({New FieldValue With {.IsNumeric = True, .Number = CType(zi.ToOADate, Integer), .Text = zi}})
Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And from now on it's pretty simple as you can call the SelectValues() function of the IField interface and give it the IEnumerable(Of FieldValue) from your class. Something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Public Sub ApplySelections(ByVal location As ILocation, ByVal id As IAppIdentifier, ByVal QSSelections As QlikSelection)
  Dim app = location.App(id)
  app.GetField(QSSelections.fieldname).SelectValues(QSSelections.fieldvalues)
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2020 06:46:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1678249#M12369</guid>
      <dc:creator>catalin</dc:creator>
      <dc:date>2020-02-23T06:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Make selection / set filter in Qlik Sense App via .NET SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1819025#M15191</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It's late response but it may help someone.&lt;/P&gt;&lt;P&gt;I was searching the solution for filters with multiple value using dotnet and I found the below solutions and It's working fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var fieldLst = new List&amp;lt;FieldValue&amp;gt;();&lt;BR /&gt;foreach (string account in accountArray)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FieldValue fieldValue = new FieldValue();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldValue.IsNumeric = false;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldValue.Text = account;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldLst.Add(fieldValue);&lt;BR /&gt;}&lt;BR /&gt;app.GetField(field).SelectValues(fieldLst, true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Hemik&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 08:40:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Make-selection-set-filter-in-Qlik-Sense-App-via-NET-SDK/m-p/1819025#M15191</guid>
      <dc:creator>Hemik</dc:creator>
      <dc:date>2021-07-01T08:40:01Z</dc:date>
    </item>
  </channel>
</rss>

