Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
Excellent and Super!
This is a really good example.
Thank you very much!
Sören