Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bug in comparing strings when using <= operator

I just sent this bug request to support@qlik.com. Let's see what's coming up:

Hello!

I have a problem concerning string comparison and the <= operator. Using >= works as expected.

Tested in Executive Dashboard example file on field City.

Situation:

Make a new sheet.

Display the City- field as a list box.

Construct 2 variables: vFrom and vTo

Display the variables in a input box.

Create a macro.

CopyPaste this code into the module:

sub SearchBetween

set f = ActiveDocument.Fields("City")

f.Select ""

vFrom = ActiveDocument.Variables("vFrom").GetContent().String

vTo = ActiveDocument.Variables("vTo").GetContent().String

f.Select "= City >= '"& vFrom & "' and City <= '" & vTo & "'"

end sub

Create a button that runs the code.

Type in the variable values as follows:

vFrom = A*

vTo = C*

Press button.

The expected result should be that all works starting with letters A, B and C should be selected.

The result however is: words starting with letters A and B are selected, NOT C.

Clearly, a bug when handling the <= operator.

Labels (3)
11 Replies
swuehl
MVP
MVP

Sören,

I think it should work if you use a select in field action search term like

='(' & concat({1} IF(Text >= '$(vFromText)' and Text <= '$(vToText)', Text), '|') & ')'

See attached.

Stefan

Not applicable
Author

Excellent and Super!

This is a really good example.

Thank you very much!

Sören