<?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: Pre-select On Field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pre-select-On-Field/m-p/1801087#M1211689</link>
    <description>&lt;P&gt;need more info, this will depend.&amp;nbsp; assuming that HasValue can only either be 1, 0.&amp;nbsp; is the field set to always one selected?&amp;nbsp; if neither is selected, did you want to set it to 1?&amp;nbsp; is it possible for the field to be both selected?&amp;nbsp; if so, what do you do?&lt;/P&gt;&lt;P&gt;if the field is always one selected (in one list box):&lt;BR /&gt;in action add select field&lt;/P&gt;&lt;P&gt;field: HasValue&lt;BR /&gt;value: if(only(HasValue)=1,0,1)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;this gets complicated if it is not set to always one selected.&amp;nbsp; you need to add if conditions for when no selection is made or when both possible values are selected like:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if(getselectedcount(HasValue)&amp;lt;&amp;gt;1, 1,&lt;BR /&gt;if(only(HasValue)=1,0,1&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;tweak that depending on your actual scenario&lt;/P&gt;</description>
    <pubDate>Tue, 20 Apr 2021 20:44:52 GMT</pubDate>
    <dc:creator>edwin</dc:creator>
    <dc:date>2021-04-20T20:44:52Z</dc:date>
    <item>
      <title>Pre-select On Field</title>
      <link>https://community.qlik.com/t5/QlikView/Pre-select-On-Field/m-p/1800858#M1211664</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;P&gt;On the Period Field, have a field 'HasValue' = 1 is Yes, 0 is No.&lt;/P&gt;&lt;P&gt;If the user selects "Select Periods" in the Button, I would like to apply the filter "HasValue = 1" to the Period Field.&lt;/P&gt;&lt;P&gt;If they select the opposite, I would like to clear that filter. (I cannot apply a Bookmark - they have been disabled on our system)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 10:02:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pre-select-On-Field/m-p/1800858#M1211664</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2021-04-20T10:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Pre-select On Field</title>
      <link>https://community.qlik.com/t5/QlikView/Pre-select-On-Field/m-p/1801087#M1211689</link>
      <description>&lt;P&gt;need more info, this will depend.&amp;nbsp; assuming that HasValue can only either be 1, 0.&amp;nbsp; is the field set to always one selected?&amp;nbsp; if neither is selected, did you want to set it to 1?&amp;nbsp; is it possible for the field to be both selected?&amp;nbsp; if so, what do you do?&lt;/P&gt;&lt;P&gt;if the field is always one selected (in one list box):&lt;BR /&gt;in action add select field&lt;/P&gt;&lt;P&gt;field: HasValue&lt;BR /&gt;value: if(only(HasValue)=1,0,1)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;this gets complicated if it is not set to always one selected.&amp;nbsp; you need to add if conditions for when no selection is made or when both possible values are selected like:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if(getselectedcount(HasValue)&amp;lt;&amp;gt;1, 1,&lt;BR /&gt;if(only(HasValue)=1,0,1&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;tweak that depending on your actual scenario&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 20:44:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pre-select-On-Field/m-p/1801087#M1211689</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-04-20T20:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pre-select On Field</title>
      <link>https://community.qlik.com/t5/QlikView/Pre-select-On-Field/m-p/1801144#M1211697</link>
      <description>&lt;P&gt;Hi Edwin,&lt;/P&gt;&lt;P&gt;Thank you so much for your reply.&lt;/P&gt;&lt;P&gt;So HasValue can have only one at a time selected...either 1, or it is cleared (HasValue=). If they have nothing selected, I want it cleared. Hope that makes sense.&lt;/P&gt;&lt;P&gt;Appreciate your assistance&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 06:14:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pre-select-On-Field/m-p/1801144#M1211697</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2021-04-21T06:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Pre-select On Field</title>
      <link>https://community.qlik.com/t5/QlikView/Pre-select-On-Field/m-p/1801150#M1211698</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vegar_1-1618986764051.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/53329i649A4FEFF2A87670/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vegar_1-1618986764051.png" alt="Vegar_1-1618986764051.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I created an alternative to the variable based solution of&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/58578"&gt;@edwin&lt;/a&gt;&amp;nbsp;, using select in field. Notice that sending an empty string as a search parameter clears your selection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used HasValue&amp;gt;0 in my IF because the sample application did not contain 1 and 0, it contained&amp;nbsp; &amp;nbsp; 2 and 0, my example will work for both scenarios.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vegar_2-1618986990640.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/53330i119E793B54B110B8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Vegar_2-1618986990640.png" alt="Vegar_2-1618986990640.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 06:36:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pre-select-On-Field/m-p/1801150#M1211698</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2021-04-21T06:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Pre-select On Field</title>
      <link>https://community.qlik.com/t5/QlikView/Pre-select-On-Field/m-p/1801157#M1211700</link>
      <description>&lt;P&gt;Awesome Vegar! Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 07:00:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pre-select-On-Field/m-p/1801157#M1211700</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2021-04-21T07:00:49Z</dc:date>
    </item>
  </channel>
</rss>

