Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
Not applicable

List box - either/or selections?

Hi QlikView gurus - this is probably a simple question.

I have a list box:

I need an option where either "All Lines" can be checked, or any other combination of lines, but not both at the same time. Right now, it's working like this:

This returns very bad data.

Thank you in advance for your help!

1 Solution

Accepted Solutions
sinanozdemir
Valued Contributor III

Re: List box - either/or selections?

Hi,

Can you take a look at it now?

Thanks

View solution in original post

9 Replies
sinanozdemir
Valued Contributor III

Re: List box - either/or selections?

Hi,

I might have misunderstood your requirements, but here is what I have:

Capture.PNG

Capture2.PNG

You are hiding all other selections and the exp is:

Capture.PNG

Let me know if this is what you are looking for.

Thanks

Not applicable

Re: List box - either/or selections?

Thanks, but that wasn't quite working for what I need. I think I need and either / or function so that "All lines" can't be chosen at the same time as any of the other lines, but any combination of other lines can be chosen. "All Lines" is a sum total of the other lines, so if it is chosen along with other lines it returns redundant data.

MVP
MVP

Re: List box - either/or selections?

try to add a trigger on your field (on select)

Actions    --> Select in field 

Field          -->Line

Search String

='(' & 

if(Alt(SubStringCount(GetFieldSelections(Line, '-'), 'All lines'), 0)

  ,chr(34) & 'All lines' & chr(34),

  chr(34) & GetFieldSelections( Line, chr(34) & '|' & chr(34) ) & chr(34)

  )

& ')'

When you select "All lines" or "All lines" and something else the trigger will select "All lines"

Not applicable

Re: List box - either/or selections?

Thank you, but that's not working either. I attached the qvw below. It's the same issue with the "Metric" list box. If "Overall DT %" is chosen, user shouldn't be able to make other selections at the same time.

sinanozdemir
Valued Contributor III

Re: List box - either/or selections?

Hi,

Can you take a look at it now?

Thanks

View solution in original post

Not applicable

Re: List box - either/or selections?

That works great. Thank you!!!

sinanozdemir
Valued Contributor III

Re: List box - either/or selections?

You are welcome.

mohan2391
Contributor II

Re: List box - either/or selections?

Hi,

Could you explain the process here. I have personal edition only, can't open your QVW.

Not applicable

Re: List box - either/or selections?

Presentation2.jpg

Expression is =If(GetFieldSelections(Line) = 'All Lines', Aggr(Line, Line), Line)