Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
MVP
MVP

Re: Button help

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
Highlighted
MVP
MVP

Re: Button help

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?

Highlighted
Not applicable

Re: Button help

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

Highlighted
MVP
MVP

Re: Button help

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

Highlighted
Not applicable

Re: Button help

Hi

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

Chris

Highlighted
MVP
MVP

Re: Button help

an example in the attachment

Search String is

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

1.png

Highlighted
Not applicable

Re: Button help

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

Chris

Highlighted
MVP
MVP

Re: Button help

Address

if the field ha s spaces

[field with spaces]

Highlighted
Not applicable

Re: Button help

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

Highlighted
MVP
MVP

Re: Button help

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