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

Button help

  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

1 Solution

Accepted Solutions
maxgro
MVP
MVP

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)

1.png

View solution in original post

9 Replies
maxgro
MVP
MVP

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?

Not applicable
Author

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

maxgro
MVP
MVP

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....)

Not applicable
Author

Hi

Yes we want the button to select adresses with a NPV value between the 2 values (-£4999 and £4999).

Chris

maxgro
MVP
MVP

an example in the attachment

Search String is

='(' & '"' & concat({$ <[NPV Total]={"<-4999>4999"}>} Address, '"' & '|' & '"') & '"' & ')'

1.png

Not applicable
Author

Does the text have to be in a certain format, e.g Address or [Address] or =Address?

Chris

maxgro
MVP
MVP

Address

if the field ha s spaces

[field with spaces]

Not applicable
Author

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

maxgro
MVP
MVP

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)

1.png