Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select in Field Trigger Greater than less than not handling exceptions

Hi,

I have input box, which has 2 inputs vMinSY and vMaxSY for user to enter a value and I have triggers set on these variables to select in field "X" and have the expression ='>='&$(vMinSY)&'<='&$(vMaxSY) in Search String. If I input something like vMinSY = 20 and vMaxSY= 30, I get the values in field "X" which are >= 20 and <=30, but if I enter vMinSY=30 and vMaxSY=20, I get values of field "X" less than or equal to 20, but I don't want the field "X" to return anything, if vMinSY > vMaxSY.

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

Seems to be working for the attached file

Capture.PNG

Try doing a 30 for vMin and 20 for vMax and nothing will be selected

View solution in original post

16 Replies
sunny_talwar

May be like this

=If(vMaxSY > vMinSY, '>='&$(vMinSY)&'<='&$(vMaxSY))

Not applicable
Author

I just edited the last line of the question..

sunny_talwar

I guess this then

=If($(vMaxSY) >= $(vMinSY), '>='&$(vMinSY)&'<='&$(vMaxSY))

tamilarasu
Champion
Champion

Hi Naveed,

Try this,

='>='& If(vMinSY < vMaxSY, $(vMinSY)&'<='&$(vMaxSY),' ')

Not applicable
Author

I tried this, but if vMaxSY < vMinSY, I still get all values from field X. I tried giving a Null() in the else part of the if condition too.

sunny_talwar

So you are saying when the statement is false, you don't want to select anything, but it is still selecting? Would you be able to share an example where this is taking place?

Not applicable
Author

I still get back all values if vMaxSY < vMinSY

sunny_talwar

Seems to be working for the attached file

Capture.PNG

Try doing a 30 for vMin and 20 for vMax and nothing will be selected

tamilarasu
Champion
Champion

I have't tested but I think it should work.

Try adding some symbols like,

='>='& If(vMinSY < vMaxSY, $(vMinSY)&'<='&$(vMaxSY),'~')