<?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: How to get search string assigned to a field? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-get-search-string-assigned-to-a-field/m-p/404133#M150346</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mayil &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I guess there is no "builtin" method from the API that I can use to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll use what you propose if that's the case&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Nov 2012 18:17:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-05T18:17:07Z</dc:date>
    <item>
      <title>How to get search string assigned to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-search-string-assigned-to-a-field/m-p/404131#M150344</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;In a VbScript macro, I'm setting a search string to a field as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13521373666651689" jivemacro_uid="_13521373666651689"&gt;&lt;P&gt;ActiveDocument.Fields("Sales").Select "&amp;gt;1500"&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have a use case where I would like to retrieve this search string. So something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;ActiveDocument.Fields("Sales").GetCurrentSearchString&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I couldn't find such method in the API. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I simply missing it or is there another way to achieve this? &lt;/P&gt;&lt;P&gt;I'm thinking to use QlikView variables as another way to do it: storing the search string into a variable and then do &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13521373737913155" jivemacro_uid="_13521373737913155"&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;ActiveDocument.Fields("Sales").Select variable_value&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 17:45:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-search-string-assigned-to-a-field/m-p/404131#M150344</guid>
      <dc:creator />
      <dc:date>2012-11-05T17:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get search string assigned to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-search-string-assigned-to-a-field/m-p/404132#M150345</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; Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub fieldselection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vDay")&lt;/P&gt;&lt;P&gt;ActiveDocument.Fields("Day").Select v.GetContent.String&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub fieldselection&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.GetVariable("vDay")&lt;/P&gt;&lt;P&gt;v.SetContent "123",true&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'To set the value for the variable&lt;/P&gt;&lt;P&gt;ActiveDocument.Fields("Day").Select v.GetContent.String&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'To assign the value to select&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 17:48:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-search-string-assigned-to-a-field/m-p/404132#M150345</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-11-05T17:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get search string assigned to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-search-string-assigned-to-a-field/m-p/404133#M150346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mayil &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I guess there is no "builtin" method from the API that I can use to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll use what you propose if that's the case&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 18:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-search-string-assigned-to-a-field/m-p/404133#M150346</guid>
      <dc:creator />
      <dc:date>2012-11-05T18:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get search string assigned to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-search-string-assigned-to-a-field/m-p/404134#M150347</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; There is no &lt;STRONG&gt;GetCurrentSearchString &lt;/STRONG&gt;option in macro as per my knowledge.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But by the above method, you can get the search string.. by using the variable in input box or assign the value for the variable in macro itself..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don'e like to go for macro means, you can go through button itself.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Action -&amp;gt;Select in field&lt;/P&gt;&lt;P&gt;Field: &lt;CODE class="jive-code"&gt;Sales&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;Search String:&amp;nbsp; '&amp;gt;='&amp;amp;1500&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it&amp;nbsp; helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 18:25:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-search-string-assigned-to-a-field/m-p/404134#M150347</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-11-05T18:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get search string assigned to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-search-string-assigned-to-a-field/m-p/404135#M150348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I just found out that this works in a macro!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;currentSearchString = ActiveDocument.Evaluate("GetFieldSelections(Sales)")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 13:39:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-search-string-assigned-to-a-field/m-p/404135#M150348</guid>
      <dc:creator />
      <dc:date>2012-11-19T13:39:59Z</dc:date>
    </item>
  </channel>
</rss>

