Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
rw470500
New Contributor III

How to load values from one Alternate State to a List Box in another Alternate State

Hello,

I have an issue regarding how to load values from one Alternate State to another Alternate State's List Box.

In the default alternate state, I have 2 List Boxes, one for Account ID and the other for Time Period (i.e. Month/Year).  The user can choose an account ID and a timer period (i.e.  Account 1234,  Month/Year  Jan-2017, Feb-2017, March-2017).

In the next tab there is a list box entitled "Country"  (i.e. Alternate State 'SRRC') that contains country names.    The country names in this list box are to represent what countries had sales activity for Account 1234 for the Month/Year period of Jan-2017, Feb-2017, March-2017.

I'm trying to create a trigger at the document level that forces the month/year information from the default alternate state into the 'SRRC' alternate state.   If I fill in the search string with a hard-copy of the months, the trigger will work.  I need a way to have the values entered dynamically (i.e. a new user will change the time periods so the month/year values will change).

AltState.bmp

Here is the search string formula that I've tried to use:

='(' & concat({$} distinct chr(34) & MONTHandYEAR & chr(34),'|') & ')'

Hopefully someone will have an idea of how I can achieve this--what I thought would be easy--task.

Thanks for your help in advance/

8 Replies

Re: How to load values from one Alternate State to a List Box in another Alternate State

The expression looks fine... could it be a format issue?

rw470500
New Contributor III

Re: How to load values from one Alternate State to a List Box in another Alternate State

How should the formula be formatted? It does not work the way it is.

Re: How to load values from one Alternate State to a List Box in another Alternate State

Would you be able to share a sample to check it out?

rw470500
New Contributor III

Re: How to load values from one Alternate State to a List Box in another Alternate State

The "Month/Year" object contains the following data:

   

Jun-2016
Jul-2016
Aug-2016
Sep-2016
Oct-2016
Nov-2016
Dec-2016
Jan-2017
Feb-2017
Mar-2017
Apr-2017
May-2017

Re: How to load values from one Alternate State to a List Box in another Alternate State

Tested it out and it seems to be working for me in both cases (1 if the values are read as text or date). PFA samples

rw470500
New Contributor III

Re: How to load values from one Alternate State to a List Box in another Alternate State

Hi Sunny.  It works like a charm.   You've saved me so much time>

Thanks for all of your help. 

Re: How to load values from one Alternate State to a List Box in another Alternate State

I am glad it worked...

vishsaggi
Esteemed Contributor III

Re: How to load values from one Alternate State to a List Box in another Alternate State

Did you by mistake check your reply as correct? May be you should mark Sunny's reply as correct or helpful. 🙂