<?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 store values of previously selected fields in a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945560#M325703</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pratik,&lt;/P&gt;&lt;P&gt;cumul and cumul2 are just used to store the result.&lt;/P&gt;&lt;P&gt;The trigger actions on field col3 are using expressions to build them (see document properties/triggers/field event triggers).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Oct 2015 07:28:17 GMT</pubDate>
    <dc:creator>vincent_ardiet</dc:creator>
    <dc:date>2015-10-23T07:28:17Z</dc:date>
    <item>
      <title>How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945545#M325688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Qlik viewers,&lt;/P&gt;&lt;P&gt;I wanted to store the previously selected values of a field into a variable.&lt;/P&gt;&lt;P&gt;The scenario is like:&lt;/P&gt;&lt;P&gt;There is a list box with values A,B and C and Update button passing the selected value to the variable using getfieldselections.&lt;/P&gt;&lt;P&gt;When A is selected and update button is clicked. The variable will have A.&lt;/P&gt;&lt;P&gt;Next B is selected and update button is clicked the variable should contain A,B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way out to retrieve previously selected value of a list box/multibox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Pratik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 11:44:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945545#M325688</guid>
      <dc:creator />
      <dc:date>2015-10-22T11:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945546#M325689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be (previous)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concat({$1} DISTINCT Field, ',')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 11:53:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945546#M325689</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-10-22T11:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945547#M325690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry but didnt understand..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 11:55:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945547#M325690</guid>
      <dc:creator />
      <dc:date>2015-10-22T11:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945548#M325691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Pratik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can achieve this using variables from within your document, which are set under Settings &amp;gt; System Variables. In the document which I have attached I created a variable called vLog with the definition of&lt;/P&gt;&lt;P&gt;=GetFieldSelections(FieldA) &amp;amp; GetFieldSelections(FieldB) &amp;amp; GetFieldSelections(FieldC)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also just use this from within a text box and this keeps a log of the selections from within Fields A,B,C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to look at current selections then QlikView does have a Current Selections Box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please look at this and if this helps resolve your question, please mark this as helpful and correct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 12:08:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945548#M325691</guid>
      <dc:creator>mjm</dc:creator>
      <dc:date>2015-10-22T12:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945549#M325692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mark for your quick response, but this isnt solving my purpose.&lt;/P&gt;&lt;P&gt;The requirement is: There is one field named FieldA ok. This Field has the values 1,2,3,4,5.&lt;/P&gt;&lt;P&gt;When 1 is selected the variable should have 1 when a button is clicked (behind the button the action to pass the field value in variable must be set, eg. getcurrentselections(FieldA)). Next when 2 is selected, and button is clicked the variable should have 1,2. Next when 3 is selected and button is clicked the variable should have 1,2,3. and so onn..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pratik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 12:18:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945549#M325692</guid>
      <dc:creator />
      <dc:date>2015-10-22T12:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945550#M325693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Pratik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do look at the application which I sent you. This does exactly what you require in the text box. For your assistance I have also proved this in my screenshot attached&lt;IMG alt="selectionsmade.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/102800_selectionsmade.JPG" style="height: 116px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've selected 1 A and 6 and the text box shows 1A6 to show all the selections which I have made&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please mark this as helpful and correct if you are happy this resolves your question&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 12:23:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945550#M325693</guid>
      <dc:creator>mjm</dc:creator>
      <dc:date>2015-10-22T12:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945551#M325694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But I want values to be logged for the same field Mark.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 12:26:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945551#M325694</guid>
      <dc:creator />
      <dc:date>2015-10-22T12:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945552#M325695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Create an empty variable for example vconcat and an action on the button to set the content of this variable with:&lt;/P&gt;&lt;P&gt;='$(vconcat)'&amp;amp;if(len('$(vconcat)') and GetSelectedCount(FieldA)=1,',','')&amp;amp;FieldA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 12:28:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945552#M325695</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2015-10-22T12:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945553#M325696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vincent,&lt;/P&gt;&lt;P&gt;Thanks for your reply.. But those field values I gave were just for example purpose. The actual values for the field will not be of len(Field)= 1. Im still stuck..&lt;/P&gt;&lt;P&gt;The scenario is: I want to eliminate values from the list box, which are once selected.&lt;/P&gt;&lt;P&gt;Once the user selects a value from the list box, and clicks a button. On that button I want to pass an action which will remove the selected value from the list box. That is the reason I wanted the previously selected values to be stored in a variable.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/96544"&gt;gwassenaar&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pratik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 04:51:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945553#M325696</guid>
      <dc:creator />
      <dc:date>2015-10-23T04:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945554#M325697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There is not problem in my expression with len(Field)&amp;gt;1.&lt;/P&gt;&lt;P&gt;It will do what you've initially asked for: to store each selection one by one in the selected order in string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, to achieve your new requirement, removing from the list box the values previously selected you can do like this:&lt;/P&gt;&lt;P&gt;- Create another empty variable vconcatSA&lt;/P&gt;&lt;P&gt;- Add a second trigger on FieldA which affect vconcatSA with the following expression:&lt;/P&gt;&lt;P&gt;='$(vconcatSA)'&amp;amp;if(len('$(vconcatSA)') and GetSelectedCount(FieldA)=1,',','')&amp;amp;'|'&amp;amp;FieldA&amp;amp;'|'&lt;/P&gt;&lt;P&gt;- Then use the following expression in your listbox instead of directly FieldA:&lt;/P&gt;&lt;P&gt;=aggr(only({&amp;lt;FieldA=&amp;gt;-&amp;lt;FieldA={&amp;lt;$(=replace('$(vconcatSA)','|',chr(39)))&amp;gt;} FieldA),FieldA)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 05:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945554#M325697</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2015-10-23T05:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945555#M325698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And if you want to let your users pick multiple values and also not do destroy the string when the clear button is pressed, change the following expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First trigger on FieldA to assign vconcat:&lt;/P&gt;&lt;P&gt;='$(vconcat)'&amp;amp;if(GetSelectedCount(FieldA)&amp;gt;0,if(len('$(vconcat)'),',','')&amp;amp;concat(distinct FieldA,','))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second trigger on FieldA to assign vconcatSA:&lt;/P&gt;&lt;P&gt;='$(vconcatSA)'&amp;amp;if(GetSelectedCount(FieldA)&amp;gt;0,if(len('$(vconcatSA)'),',','')&amp;amp;'|'&amp;amp;concat(distinct FieldA,'|,|')&amp;amp;'|')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 06:02:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945555#M325698</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2015-10-23T06:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945556#M325699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vincent thanks for your reply again.&lt;/P&gt;&lt;P&gt;But its not giving me the desired results.&lt;/P&gt;&lt;P&gt;When nothing is selected vconcat is blank and vconcatSA is blank, then when i select 1 from FieldA, vconcat has 1,1 and vconcatSA has |1|,|1| and so on..&lt;/P&gt;&lt;P&gt;And upon using the aggr expresion in list box expression it gives blank. No values are populated in the list box.&lt;/P&gt;&lt;P&gt;Can u post the qvw in which you got the results, maybe I am missing some steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pratik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 06:18:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945556#M325699</guid>
      <dc:creator />
      <dc:date>2015-10-23T06:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945557#M325700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here it is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 06:33:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945557#M325700</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2015-10-23T06:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945558#M325701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vincent you qvw is the exact solution which I am looking for. Thanks alot.&lt;/P&gt;&lt;P&gt;The list box expression is working now, idk why but earlier it gave an error in expression. I copied yours and changed the field values this the list box popped up with values.&lt;/P&gt;&lt;P&gt;But I am unable to see your variable expressions. for cumul and cumul2.&lt;/P&gt;&lt;P&gt;Can you please paste them here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pratik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 06:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945558#M325701</guid>
      <dc:creator />
      <dc:date>2015-10-23T06:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945559#M325702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/41383"&gt;vincent.ardiet&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 07:19:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945559#M325702</guid>
      <dc:creator />
      <dc:date>2015-10-23T07:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945560#M325703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pratik,&lt;/P&gt;&lt;P&gt;cumul and cumul2 are just used to store the result.&lt;/P&gt;&lt;P&gt;The trigger actions on field col3 are using expressions to build them (see document properties/triggers/field event triggers).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 07:28:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945560#M325703</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2015-10-23T07:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to store values of previously selected fields in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945561#M325704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Alot Vincent!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 07:35:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-store-values-of-previously-selected-fields-in-a-variable/m-p/945561#M325704</guid>
      <dc:creator />
      <dc:date>2015-10-23T07:35:08Z</dc:date>
    </item>
  </channel>
</rss>

