Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Passing multiple values

Hello all

I have 2 Listboxs, one called 'Colours 1' and the other called 'Colours 2' and there is no relationship between the two tables.

I select 3 colours from 'Colours 1'. How can i make 'Colours 2' reflect the selections i made in 'Colours 1'????

Hope somebody can help, it's driving me nuts!!!!!!

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

It's all in the syntax

='(' & Concat(Replace(Replace(Colour, ' ', '*'), '&', '*'), '|') & ')'

You can next several Replace() functions, but depending on all possible values, it may be worth cleaning the code in the script, so you have a field with the name to show and other field with the name clean to operate with.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

View solution in original post

13 Replies
Not applicable
Author

Hi,


You can set an action on the field On-Selection event trigger page (document properties) and then force the other selection to match the first listbox.

Regards,

Anonymous
Not applicable
Author

Thanks jonathandd

I have already tried field event triggers but it doesn't work. I set an action to the OnChange of Colour 1. The action i used was the Select In Field of Colour 2 but it doesn't work.

Anybody else help?

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   I dont know the reason, but this could be the one of them.

   If you want to select more than one value using selection action.

   you should use this way

   (A|B)

   this will select A and B from the field/Object.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Miguel_Angel_Baeyens

Hi,

Select in field will work, but it may need some tweaking. Assuming you have two listboxes with fields named Color1 and Color2, create a new button and set the action Selection, Select in Field, field is Color2 and Search String

='(' & Concat(Color1, '|') & ')

Everytime you click on the button all values in Color1 should be selected in Color2, provided they exist, of course.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

You can try'Toggle Select' as well.

Cheers

Anonymous
Not applicable
Author

Hi guys,

Still can't seem to get this working. I think GetFieldSelections is the solution but can't get it working for multiple selections. It does work if you select one but not more than one!!!!

I would have thought this would be quite a straight forward question, but it seems to be confusing others!!!!!

Anonymous
Not applicable
Author

I have attached a QVW for reference.

Miguel_Angel_Baeyens

Here you are your ammended application, according to what I mentioned above using Concat in search string.

Regards.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Anonymous
Not applicable
Author

Miguel you are a fantastic, thankyou!!! Still don't understand how it works!!!!!  

Just one more thing. What if the words had spaces in?  for example 'Light Yellow' or 'Dark Pink'...This seems to be ignored.

I have attached a file for reference.

Thankyou once again for replying.

Robbie