<?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 limit length of variable? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238835#M622117</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;I'm glad it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the line breaks, maybe you could use this expression instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14859010054715564" jivemacro_uid="_14859010054715564"&gt;
&lt;P&gt;=Now()&amp;amp;': '&amp;amp;GetCurrentSelections(' // ')&amp;amp;Chr(13)&amp;amp;Chr(10)&amp;amp;If(SubStringCount(vSelHist,Chr(13)&amp;amp;Chr(10))&amp;lt;=9,vSelHist,Left(vSelHist,Index(vSelHist,Chr(13)&amp;amp;Chr(10),9)+1))&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jan 2017 22:17:03 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2017-01-31T22:17:03Z</dc:date>
    <item>
      <title>How to limit length of variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238829#M622110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi everyone!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm developing an analysis tool for one of our customers in QV.. one feature of this app is the possibility to log the selections made by the user. This is realized through a variable which is refreshed with every action: its content gets thereby expanded with a timestamp (now()) and the current selection status (GetCurrentSelections()) in a new row (chr(13)). The content of the variable is displayed in a text box on a separate sheet. Thus, the user can explore the data and afterwards reproduce its actions through the log. Although this is already working very well, I would like to limit the variable to something like 300 rows (=300 last actions) because of performance aspects. I already added the possibility to clear the log-variable through a button manually. However, since the user might forget to push this button every now and then, an automatic solution seems reasonable..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if there is a possibility to limit the length of a variable row-wise? Only hint I found so far was using "autocommenting expression" but neither I wasn't sure if this really addresses my issue nor wasn't I able to implement it. Do you have any ideas how to solve this task?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2017 10:52:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238829#M622110</guid>
      <dc:creator />
      <dc:date>2017-01-26T10:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to limit length of variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238830#M622111</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;maybe one solution might be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_247629_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/151126_QlikCommunity_Thread_247629_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_247629_Pic4.JPG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/151131_QlikCommunity_Thread_247629_Pic4.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_247629_Pic5.JPG" class="image-5 jive-image" src="https://community.qlik.com/legacyfs/online/151132_QlikCommunity_Thread_247629_Pic5.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_247629_Pic3.JPG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/151128_QlikCommunity_Thread_247629_Pic3.JPG" style="height: 314px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14856463341703461" jivemacro_uid="_14856463341703461"&gt;
&lt;P&gt;=Now()&amp;amp;': '&amp;amp;GetCurrentSelections(' // ')&amp;amp;Chr(13)&amp;amp;Left(vSelHist&amp;amp;Repeat(Chr(13),9),Index(vSelHist&amp;amp;Repeat(Chr(13),9),Chr(13),9))&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(replace 9 with max rows-1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jan 2017 23:36:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238830#M622111</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2017-01-28T23:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to limit length of variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238831#M622112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create a counter variable to increment on every selection&lt;/P&gt;&lt;P&gt;and add condition to add to selection list only if counter variable value &amp;lt;300 &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 08:07:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238831#M622112</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-01-30T08:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to limit length of variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238832#M622113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can simplify this to a set variable action with expression&lt;/P&gt;&lt;P&gt;=Now() &amp;amp; ': ' &amp;amp; GetCurrentSelections() &amp;amp; Chr(10) &amp;amp; Left(vSelHist, Index(vSelHist, Chr(10), -1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will always drop off the last row, so this assumes that log file is already has the correct number of lines. You could create a 200 blank line starting value in a text editor, and paste that into the variable overview or use Repeat(chr(10), 200) in a set in the load script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 08:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238832#M622113</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-01-30T08:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to limit length of variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238833#M622114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this great solution! Only disadvantage in my case is that the excel-export of the log now always is 300 lines long with a lot of line breaks..but I guess I can live with that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2017 10:32:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238833#M622114</guid>
      <dc:creator />
      <dc:date>2017-01-31T10:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to limit length of variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238834#M622115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help! I have no idea why, but for some reason it didn't work in my application.. The initial pasted amount of line breaks is kept under the actual log history and therefore the variable isn't limited. However, I solved it with Marco's approach-&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2017 10:46:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238834#M622115</guid>
      <dc:creator />
      <dc:date>2017-01-31T10:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to limit length of variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238835#M622117</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;I'm glad it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the line breaks, maybe you could use this expression instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14859010054715564" jivemacro_uid="_14859010054715564"&gt;
&lt;P&gt;=Now()&amp;amp;': '&amp;amp;GetCurrentSelections(' // ')&amp;amp;Chr(13)&amp;amp;Chr(10)&amp;amp;If(SubStringCount(vSelHist,Chr(13)&amp;amp;Chr(10))&amp;lt;=9,vSelHist,Left(vSelHist,Index(vSelHist,Chr(13)&amp;amp;Chr(10),9)+1))&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2017 22:17:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-limit-length-of-variable/m-p/1238835#M622117</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2017-01-31T22:17:03Z</dc:date>
    </item>
  </channel>
</rss>

