<?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 Bug in comparing strings when using &amp;lt;= operator in Archived Groups</title>
    <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442011#M4152</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I just sent this bug request to &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:support@qlik.com" target="_blank"&gt;support@qlik.com&lt;/A&gt;&lt;SPAN&gt;. Let's see what's coming up:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem concerning string comparison and the &amp;lt;= operator. Using &amp;gt;= works as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tested in Executive Dashboard example file on field City.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Situation:&lt;/P&gt;&lt;P&gt;Make a new sheet.&lt;/P&gt;&lt;P&gt;Display the City- field as a list box.&lt;/P&gt;&lt;P&gt;Construct 2 variables: vFrom and vTo&lt;/P&gt;&lt;P&gt;Display the variables in a input box.&lt;/P&gt;&lt;P&gt;Create a macro. &lt;/P&gt;&lt;P&gt;CopyPaste this code into the module:&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_13557402675648404" jivemacro_uid="_13557402675648404"&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;sub SearchBetween&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; set f = ActiveDocument.Fields("City")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; f.Select ""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; vFrom = ActiveDocument.Variables("vFrom").GetContent().String&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; vTo = ActiveDocument.Variables("vTo").GetContent().String&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; f.Select "= City &amp;gt;= '"&amp;amp; vFrom &amp;amp; "' and City &amp;lt;= '" &amp;amp; vTo &amp;amp; "'"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a button that runs the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type in the variable values as follows:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13557402858058839" jivemacro_uid="_13557402858058839"&gt;&lt;P&gt;vFrom = A*&lt;/P&gt;&lt;P&gt;vTo = C*&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Press button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expected result should be that all works starting with letters A, B and C should be selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result however is: words starting with letters A and B are selected, NOT C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clearly, a bug when handling the &amp;lt;= operator.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jul 2025 14:48:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2025-07-23T14:48:52Z</dc:date>
    <item>
      <title>Bug in comparing strings when using &lt;= operator</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442011#M4152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I just sent this bug request to &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:support@qlik.com" target="_blank"&gt;support@qlik.com&lt;/A&gt;&lt;SPAN&gt;. Let's see what's coming up:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem concerning string comparison and the &amp;lt;= operator. Using &amp;gt;= works as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tested in Executive Dashboard example file on field City.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Situation:&lt;/P&gt;&lt;P&gt;Make a new sheet.&lt;/P&gt;&lt;P&gt;Display the City- field as a list box.&lt;/P&gt;&lt;P&gt;Construct 2 variables: vFrom and vTo&lt;/P&gt;&lt;P&gt;Display the variables in a input box.&lt;/P&gt;&lt;P&gt;Create a macro. &lt;/P&gt;&lt;P&gt;CopyPaste this code into the module:&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_13557402675648404" jivemacro_uid="_13557402675648404"&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;sub SearchBetween&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; set f = ActiveDocument.Fields("City")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; f.Select ""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; vFrom = ActiveDocument.Variables("vFrom").GetContent().String&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; vTo = ActiveDocument.Variables("vTo").GetContent().String&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; f.Select "= City &amp;gt;= '"&amp;amp; vFrom &amp;amp; "' and City &amp;lt;= '" &amp;amp; vTo &amp;amp; "'"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a button that runs the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type in the variable values as follows:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13557402858058839" jivemacro_uid="_13557402858058839"&gt;&lt;P&gt;vFrom = A*&lt;/P&gt;&lt;P&gt;vTo = C*&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Press button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expected result should be that all works starting with letters A, B and C should be selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result however is: words starting with letters A and B are selected, NOT C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clearly, a bug when handling the &amp;lt;= operator.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2025 14:48:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442011#M4152</guid>
      <dc:creator />
      <dc:date>2025-07-23T14:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in comparing strings when using &lt;= operator</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442012#M4153</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;What is happening here is that the wildcard character is returning ascii code 42 which is less than the ascii 65 (capital letter A), hence it would only return a city value of 'C' if one existed.&amp;nbsp; If you test this with a city value of C*, this is selected by your code.&amp;nbsp; I don't think you can use a wildcard search string in a "less than" search in Qlikview this way, so this is probably not a bug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you need to do is replace the '*' character with a code higher than ascii code 122 (lower case z) or maybe a code in the extended set if you need to check for these characters.&amp;nbsp; This will fool the user into thinking they are submitting a wildcard, when actually they are not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flipside&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2012 11:57:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442012#M4153</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2012-12-17T11:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in comparing strings when using &lt;= operator</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442013#M4154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can now see why this is not a bug. I think I have to write a replace statement, that checks for the wildcard in the "to" variable and replaces the char with something else (e.g. 'ö', that is the last letter of the alphabet used here). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I assumed the select method of texts in macros works the same way as in the text boxes, I was a little bit confused over the result and assumed it to be a bug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good to have this clarification registered. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;Sören &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2012 13:23:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442013#M4154</guid>
      <dc:creator />
      <dc:date>2012-12-17T13:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in comparing strings when using &lt;= operator</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442014#M4155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sören,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you try using text operators "follows" and "precedes" instead of numeric operators "&amp;gt;=" and "&amp;lt;="?&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_13557522657998629" jivemacro_uid="_13557522657998629"&gt;&lt;P&gt;If(TextField follows 'B*' AND TextField precedes 'E*', TextField)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will return all values in TextField starting on C to those starting on D, irrespective the length of the value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2012 13:49:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442014#M4155</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-12-17T13:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in comparing strings when using &lt;= operator</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442015#M4156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the hint, but this is not working as you suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a QlikView file with the following load * inline content:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13558122289839838" jivemacro_uid="_13558122289839838"&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Text, Data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; an, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; as, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bee, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;before, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;begun, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; city, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; comparison, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; degree, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dynasty, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; effort, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ergonomy, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fastfood, 1&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I create the variables vFrom and vTo and display them in an input box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I create a chart as a straight table and put the following as a calculated dimension:&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_13558123403915751" jivemacro_uid="_13558123403915751"&gt;&lt;P&gt;=IF(Text follows '$(vFrom)' and Text precedes '$(vTo)',Text)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this as the expression:&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_13558123677655059" jivemacro_uid="_13558123677655059"&gt;&lt;P&gt;=Data&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the vFrom I put: A*&lt;/P&gt;&lt;P&gt;In the vTo I put: C*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then expect (as one could expect from the expression in the dimension), that I should get the list:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13558124632562984" jivemacro_uid="_13558124632562984"&gt;&lt;P&gt;a&lt;/P&gt;&lt;P&gt;an&lt;/P&gt;&lt;P&gt;as&lt;/P&gt;&lt;P&gt;bee&lt;/P&gt;&lt;P&gt;before&lt;/P&gt;&lt;P&gt;begun&lt;/P&gt;&lt;P&gt;city&lt;/P&gt;&lt;P&gt;comparison&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but instead I get&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13558125258432218" jivemacro_uid="_13558125258432218"&gt;&lt;P&gt;an&lt;/P&gt;&lt;P&gt;as&lt;/P&gt;&lt;P&gt;bee&lt;/P&gt;&lt;P&gt;before&lt;/P&gt;&lt;P&gt;begun&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e. the first 'a' is left out (because the filter looks at the text and expects something other than just 'a') and all the C (because the comparison expects somehting with ascii number less than 'a').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conclusion:&lt;/P&gt;&lt;P&gt;'follows' and 'precedes' works as &amp;gt;= and &amp;lt;= &lt;/P&gt;&lt;P&gt;Since, when I input &lt;/P&gt;&lt;P&gt;vFrom = A &lt;/P&gt;&lt;P&gt;vTo = Cz&lt;/P&gt;&lt;P&gt;then I get all the words that starts with a,b and c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The situation from the beginning was that I want to be able to search words within a range and do a selection in the data according to these words. I have a database table with some hundreds of thousands of rows, where there is a text field that is of interest. I am splitting the strings with subfield(&amp;lt;fieldname&amp;gt;, ' ') operator and puts the words in it table of its own. I then link this table to the rest of the data and then I have a list of just words to search in and select from. I want to be able to create a nice way of searching and selecting data for the users. The problem is that I have not found an intuitive way in QlikView to create the search functionality. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Work around:&lt;/P&gt;&lt;P&gt;Still using the macro approach and simply putting a 'z' after the vTo variable's text inside the macro code, seems to be the only way around this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sören&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 06:48:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442015#M4156</guid>
      <dc:creator />
      <dc:date>2012-12-18T06:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in comparing strings when using &lt;= operator</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442016#M4157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe with a little helper (maxstring / minstring)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 09:53:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442016#M4157</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-12-18T09:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in comparing strings when using &lt;= operator</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442017#M4158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this idea, swuehl! It's closing up, but unfortunately this is not exactly what I expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try inputting &lt;/P&gt;&lt;P&gt;vFrom = ba*&lt;/P&gt;&lt;P&gt;vTo = bu* &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should return all words beginning with 'b', since the second letter of thevFrom variable is less than second letter in 'bee' word and second letter in vTo variable is greater than second letter in 'begun' (the last word). I have no idea why the set analyzis in this case fails... But good thinking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sören&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 13:08:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442017#M4158</guid>
      <dc:creator />
      <dc:date>2012-12-18T13:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in comparing strings when using &lt;= operator</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442018#M4159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I combined these ideas to a - for me - working solution, that I attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution was to &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a list box with the following expression:&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13558364053399364" jivemacro_uid="_13558364053399364"&gt;&lt;P&gt;=if(Text &amp;gt;= '$(vFrom)' and Text &amp;lt;= '$(vTo)' &amp;amp; chr(1000), Text)&lt;/P&gt;&lt;/PRE&gt;and have this list box either hidden (have not tried that yet) or at least minimized not to confuse user&lt;/LI&gt;&lt;LI&gt;Create a macro that reads the possible values in the list with expression and selects these values:&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13558364053386159" jivemacro_uid="_13558364053386159"&gt;&lt;P&gt;sub SearchBetween&lt;/P&gt;&lt;P&gt;rem CHECK THE ID OF THE SHEET OBJECT FOR THE RIGHT ONE!&lt;/P&gt;&lt;P&gt;set table = ActiveDocument.GetSheetObject("LB02")&lt;/P&gt;&lt;P&gt;table.Clear&lt;/P&gt;&lt;P&gt;table.selectPossible&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;Create a button that runs this macro&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the tricky parts was to figure out the addendum to vTo- variable inside the expression. This is needed to select e.g. 'from=b and to=b' to get all that starts with 'b'. It is now set to chr(1000) and that's enough for our needs at the moment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will be interesting to try out on live data to get the idea if this can be a workign solution for bigger data sets &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all the good ideas!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sören &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. I could not get this to work only in macro, since the largest ascii number that vbscript can take is 255. That was somehow not enough to select the Swedish word 'början'. Therefore chr(1000) in the list.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 13:12:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442018#M4159</guid>
      <dc:creator />
      <dc:date>2012-12-18T13:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in comparing strings when using &lt;= operator</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442019#M4160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't like Macros to do something like this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you just need to check if the maxstring / minstring finds a match in your text field, if not return the original search phrase to your variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 14:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442019#M4160</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-12-18T14:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in comparing strings when using &lt;= operator</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442020#M4161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this hint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to make a version without the macro, but with a button that triggers selection in the text field, according to what the IF- statement in the list box gives. I.e :&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_13559048773086232" jivemacro_uid="_13559048773086232"&gt;&lt;P&gt;Field:&lt;/P&gt;&lt;P&gt;Text&lt;/P&gt;&lt;P&gt;Search string:&lt;/P&gt;&lt;P&gt;='(' &amp;amp; concatenate(.., '|') &amp;amp; ')'&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but there seems to be some problems with how the variable sets the triggers. I can't get it to work. The reaction in the filtered list works as one could expect, and that's a really good conclusion. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am fully aware of the no-no about QlikView and macros, but in this case I think I'll stick to the macro solution. Unless, of course, someone can help me with how to push a select on the Text field, when user has input the search cirteria. In my case, filtering one list box is not enough. The filtering has to be done on the whole data set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I'm not anymore discussing the problem that the head line states, I'll close this thread for now and ask for help somewhere else, if I cannot get the no-macro way working and if there is a demand of creating macro free solutions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answers and help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sören&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 08:21:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442020#M4161</guid>
      <dc:creator />
      <dc:date>2012-12-19T08:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in comparing strings when using &lt;= operator</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442021#M4162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sören,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it should work if you use a select in field action search term like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='(' &amp;amp; &lt;STRONG&gt;concat({1}&lt;/STRONG&gt; IF(Text &amp;gt;= '$(vFromText)' and Text &amp;lt;= '$(vToText)', Text), '|') &amp;amp; ')' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 10:37:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442021#M4162</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-12-19T10:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in comparing strings when using &lt;= operator</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442022#M4163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent and Super!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a really good example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sören&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 10:58:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Bug-in-comparing-strings-when-using-lt-operator/m-p/442022#M4163</guid>
      <dc:creator />
      <dc:date>2012-12-19T10:58:09Z</dc:date>
    </item>
  </channel>
</rss>

