I have two listboxes with codes in that are the same but form two different tables in my model. When you do a selection on one or more items in the one listbox it will cause the items with the same value in the other listbox to be selected.
I have put in a messagebox in the macro to see if it picks up the selected value and it does – but for some reason it does not select the items in the other listbox.
Macro that I activate with a button as in sample app in link above
SET fx = ActiveDocument.Fields("Code")
SET fy = ActiveDocument.Fields("TransCodeKey")
SET fyV = fy.GetNoValues
FOR i = 0 TO fxV.Count -1
fyV(i).Text = fxV(i).Text
fyV(i).IsNumeric = False
It works 100% in demo app but am I missing perhaps a setting somewhere in qlikview ? Can it be settings ? the 2 tables of mine are excatly the same - so it cant be that the values are not equal.
I'm guessing you are using V9? The double quote syntax -- which is only there only to handle the values with spaces -- doesn't seem to work in V9, but it does in V10. You can take out the " and it will work in V9, but only for values without spaces. There may be a form that works for V9, don't know off the top of my head.
I have implemented the action and it works 100% for my senario. In my case these two listboxes needs to have the same items filtered all the time. For instance my two listboxes contains products from two different tables - but products are the same. If i select one or more product in one listbox it will select the same product in other listbox.
But also now if i select a rep that is linked to the one product listbox - rep is linked to only certain products the same products will be selected in the other product listbox.
So what i did was just to implement your suggestion in the document event triggers(OnAnySelect) instead of the field event triggers because my listboxes must always have the same values filtered.
Hello, I implemented your script and it works great, but it doesn't work if I try to extend the selection to another listbox. I put your code on a field event trigger on select, then i tried to add a second trigger to control the selection of another field. The first trigger works the second doesn't. Am I doing something wrong? Is there a way to force selection on more than one listbox?