Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Employee
Employee

Using Alternate States to Select Multiple Values in a List Box with Different Attributes

This video show how to use alternate states to select multiple values in a list box when the members of the list box have different attributes. In this example a list of hockey players is used to select players to fill each position on the team.  The QVW created in the video is included in this post.

http://www.youtube.com/watch?v=jXybIzLWtAQ

5 Replies
sureshbaabu
Contributor III

Re: Using Alternate States to Select Multiple Values in a List Box with Different Attributes

Hi Josh,

Thanks for posting this document. it was very useful for me.

I have question about selecting multiple values from a list box and passing it through.

For e.g.:  If I have to select more than 1 person from the Left Wings list;

how should we change the expression on the actions to achevie this?  I tried with the open and close brackets,but it dint help.

Thank you!!

Employee
Employee

Re: Using Alternate States to Select Multiple Values in a List Box with Different Attributes

This expression should work:

='(' & Concat(DISTINCT {[Left Wing]}  Player, '|') & ')'

The results you are looking for is to have the expression resulting in:

(Name1|Name2|Name3)

sureshbaabu
Contributor III

Re: Re: Using Alternate States to Select Multiple Values in a List Box with Different Attributes

Josh,

I too tried the same initially but with this expression, it doesn’t read any selections from the list box,

Could you please take a look at it?

Thanks

Employee
Employee

Re: Re: Using Alternate States to Select Multiple Values in a List Box with Different Attributes

Hi Suresh,

The reason it isn't work is because the players have spaces in their names.  So you need to replace the space with a single character wild card - the question mark - '?'

Try this expression for your selection:

=replace('(' & Concat(DISTINCT {[Left Wing]}  Player,   '|') &  ')',' ','?')

sureshbaabu
Contributor III

Re: Re: Using Alternate States to Select Multiple Values in a List Box with Different Attributes

HI Josh,

That's cool..Thanks a lot for your time in explaining it clearly. It's wonderful !!!

Thanks again!!