Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
agni_gold
Specialist III
Specialist III

Need Help on Transfer selection between listboxs

Hi Friends ,

I have a situation,

I have 5 different Year and Month Fields

A_Year

A_Month

B_Year

B_Month

C_Year

C_Month

D_Year

D_Month

E_Year

E_Month

Now i want when i select year month from any one of them it will make same selection in all the year month fields.

And I have 5 different charts, which are based on show hide condition of different field.

So for that case I have applied field event trigger to all like ,

A_Year     -------  Select in Field Triggers ------ 1: B_Year=GetFeildSelections(A_Year)  , 2: C_Year=GetFeildSelections(A_Year)  ,

                                                                  3: D_Year=GetFeildSelections(A_Year)  , 4: E_Year=GetFeildSelections(A_Year) 

A_Month   -------  Select in Field Triggers ------ 1: B_Year=GetFeildSelections(A_Month)  , 2: C_Year=GetFeildSelections(A_Month)  ,

                                                                  3: D_Year=GetFeildSelections(A_Month)  , 4: E_Year=GetFeildSelections(A_Month

B_Year     -------  Select in Field Triggers ------ 1: A_Year=GetFeildSelections(B_Year)  , 2: C_Year=GetFeildSelections(B_Year)  ,

                                                                  3: D_Year=GetFeildSelections(B_Year)  , 4: E_Year=GetFeildSelections(B_Year

B_Month   -------  Select in Field Triggers ------ 1: A_Year=GetFeildSelections(B_Month)  , 2: C_Year=GetFeildSelections(B_Month)  ,

                                                                  3: D_Year=GetFeildSelections(B_Month)  , 4: E_Year=GetFeildSelections(B_Month



C_Year     -------  Select in Field Triggers ------ 1: B_Year=GetFeildSelections(C_Year)  , 2: A_Year=GetFeildSelections(C_Year)  ,

                                                                  3: D_Year=GetFeildSelections(C_Year)  , 4: E_Year=GetFeildSelections(C_Year

C_Month   -------  Select in Field Triggers ------ 1: B_Year=GetFeildSelections(C_Month)  , 2: A_Year=GetFeildSelections(C_Month)  ,

                                                                  3: D_Year=GetFeildSelections(C_Month)  , 4: E_Year=GetFeildSelections(C_Month



D_Year     -------  Select in Field Triggers ------ 1: B_Year=GetFeildSelections(D_Year)  , 2: C_Year=GetFeildSelections(D_Year)  ,

                                                                  3: A_Year=GetFeildSelections(D_Year)  , 4: E_Year=GetFeildSelections(D_Year

D_Month   -------  Select in Field Triggers ------ 1: B_Year=GetFeildSelections(D_Month)  , 2: C_Year=GetFeildSelections(D_Month)  ,

                                                                  3: A_Year=GetFeildSelections(D_Month)  , 4: E_Year=GetFeildSelections(D_Month


E_Year     -------  Select in Field Triggers ------ 1: B_Year=GetFeildSelections(E_Year)  , 2: C_Year=GetFeildSelections(E_Year)  ,

                                                                  3: D_Year=GetFeildSelections(E_Year)  , 4: A_Year=GetFeildSelections(E_Year

E_Month   -------  Select in Field Triggers ------ 1: B_Year=GetFeildSelections(E_Month)  , 2: C_Year=GetFeildSelections(E_Month)  ,

                                                                  3: D_Year=GetFeildSelections(E_Month)  , 4: A_Year=GetFeildSelections(E_Month



After this i have plotted all 5 year month fields indivisual in a new sheet and check the selection , it is working fine .


But after making selection in my other field , on which my charts are hidden , then strange behaviour comming , any of the chart enable .

I am not able to understand,


I cannot attach my file , its size is 29 MB after reducing data .




7 Replies
nizamsha
Specialist II
Specialist II

Hi

Can u share your Data

ecolomer
Master II
Master II

See this example

agni_gold
Specialist III
Specialist III
Author

Hi friend ,

What is the difference

when i am using only

=GetFeildSelections(D_Month)

and you are using

= '(' & getfieldselections(A.NombrePais,'|') & ')'

Is this causing any error ?

Is because of this i am getting my error.

evan_kurowski
Specialist
Specialist

 

Hello Agnivesh,

 

Enrique's example takes into account the syntax for a multi-value chain when assigning a 'Select In Field' match.

It has to be in the following format: (alpha|beta|gamma|delta|”ep si lon”)


(keep single quotes out of this chain, wrap spaces in double quotes) 

Your default usage of GetFieldSelections() will be compatible with ‘Select in Field’ when you are selecting a single value in a field.

Once you select between 2-6 values at a time, GetFieldSelections() will return a comma-delimited chain which the ‘Select In Field’ trigger can’t parse (because of the syntax).

 

Switching the value_sep parameter to a ‘|’ pipe character and then wrapping each end in parenthesis will form valid multi-value chains for ‘Select In Field’

 

='(' & GetFieldSelections([Field A],'|') & ')'

 

Be cautious again, when you start selecting 6 or more values in a field.  The output of GetFieldSelections() switches to literally returning ‘x of y values’, 'not x of y values, or 'All'

 

If you want to use GetFieldSelections() to form a selection chain that is going to cover any combination of values from a field, the max_values parameter needs to be sized to match the number of distinct values in that field.

 

agni_gold
Specialist III
Specialist III
Author

Thanks

agni_gold
Specialist III
Specialist III
Author

Hi Friend

Please find attached my application for which i have asked my question hare year and month fields are those for which i have asked question , please see triggers i have applied and here i have 4 containers which are hide and show based in tree hierarchy condition.

agni_gold
Specialist III
Specialist III
Author

Hi Friend I have attached my sample application in above reply

https://community.qlik.com/servlet/JiveServlet/download/887533-190904/Test%20-%20Copy.qvw

Please see and try to solve my problem