Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I thought an option with a button was when you selcted it, it would then select possible data, i.e work just like a list box.
We have setup a button with the action 'select possible. In the field option we have put the following an expression which we know works: =Count({<[NPV Total]={">=-4999<=4999"}>} [Address]). However, when we click the button nothing happens.
Can anyone help?
Chris
short:
the expression builds the search string with the addresses you can use in the listbox
detailed
open my .qvw; there is a textbox with the result of the expression (concat.............)
the expression builds the list between double quotes, pipe separated, of Address values with NPV Total <-4999 and > 4999
if you put the result ("ccm2"|"eaf3"|"lf1") of the expression in the listbox (caption) and press enter you select the list of Address values with NPV Total <-4999 and > 4999
when you click the button you get the same result: you select in field Address the result of the expression ("ccm2"|"eaf3"|"lf1")
doubles quotes are only needed if the Address values have spaces (I think they have)
Could you post your qlikview doc (.qvw)? The select possible action didn't have any parameter other than field and the field is a field, not an expression.
Maybe you need the select in field action instead of select possible?
Hi,
Unfortunately not as it is sensitive.
I have tried the 'select in field' option. With this there is a 'field' and 'search string' option. I tried putting [NPV Value] in field and then the same expression as above in the search string. But again nothiung happens.
Chris
which field do you want to select? Address?
the expression of select in field should return the list of values you want to select, not a number as in you r expression (count....)
Hi
Yes we want the button to select adresses with a NPV value between the 2 values (-£4999 and £4999).
Chris
an example in the attachment
Search String is
='(' & '"' & concat({$ <[NPV Total]={"<-4999>4999"}>} Address, '"' & '|' & '"') & '"' & ')'
Does the text have to be in a certain format, e.g Address or [Address] or =Address?
Chris
Address
if the field ha s spaces
[field with spaces]
Hi,
Thanks very much for this.
I have copied this in and it worked but it's >=-4999<=4999 need to do. When I tweaked your expression to the following it doesn't work:
='(' & '"' & concat({$ <[NPV Total]={"<-4999<=4999"}>} Address, '"' & '|' & '"') & '"' & ')'
Can you please help explain the logic of this expression, in particular why concat and why the four lots of " & 's?
Chris
short:
the expression builds the search string with the addresses you can use in the listbox
detailed
open my .qvw; there is a textbox with the result of the expression (concat.............)
the expression builds the list between double quotes, pipe separated, of Address values with NPV Total <-4999 and > 4999
if you put the result ("ccm2"|"eaf3"|"lf1") of the expression in the listbox (caption) and press enter you select the list of Address values with NPV Total <-4999 and > 4999
when you click the button you get the same result: you select in field Address the result of the expression ("ccm2"|"eaf3"|"lf1")
doubles quotes are only needed if the Address values have spaces (I think they have)