Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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

Re: Select in Field Trigger Greater than less than not handling exceptions

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

16 Replies

Re: Select in Field Trigger Greater than less than not handling exceptions

May be like this

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

Not applicable

Re: Select in Field Trigger Greater than less than not handling exceptions

I just edited the last line of the question..

Re: Select in Field Trigger Greater than less than not handling exceptions

I guess this then

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

Re: Select in Field Trigger Greater than less than not handling exceptions

Hi Naveed,

Try this,

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

Not applicable

Re: Select in Field Trigger Greater than less than not handling exceptions

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.

Re: Select in Field Trigger Greater than less than not handling exceptions

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

Re: Select in Field Trigger Greater than less than not handling exceptions

I still get back all values if vMaxSY < vMinSY

Re: Select in Field Trigger Greater than less than not handling exceptions

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

Re: Select in Field Trigger Greater than less than not handling exceptions

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

Try adding some symbols like,

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