Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Force a selected value in one filter to be selected on another filter

I have 2 filters: 'All Movies' and 'Future Releases'.

The filter 'Future Releases' is set to 'Only one selected value' while the filter 'All Movies' lets user select multiple values.

When a user selects a value in filter 'Future Releases', I want to force the same value to be selected in the other filter 'All Movies' and also let user select additional values in this filter.

Can anyone help?

Thank you.

5 Replies
Anonymous
Not applicable
Author

Vilar,
Here is a macro I used to copy field to field:


sub FieldToField
set src=ActiveDocument.Fields("F1")
set dst=ActiveDocument.Fields("F2")
set F1Selections=src.GetPossibleValues
dst.SelectValues F1Selections
end sub

For you F1 is Future Releases and F2 is All Movies.
Apply it to event selections in F1. As for additional selections, as usual - press and hold CTRL while making selections.

Not applicable
Author

Put a Field Event Trigger (Document Properties>Triggers) on Future Released. For the Trigger, use Select in Field. All Movies should be the field and the search string can be:

=GetFieldSelections([Future Releases])


Not applicable
Author

Michael,

Thanks for the quick response.

I am using QlikView 8.5 client and I get the following error when I test the macro:

Object requried: 'src'

The line is set F1Selections=src.GetPossibleValues

Anonymous
Not applicable
Author

Can't think of any reason... Worked fine for me every time, just needed sometimes to add an optional parameter if the number of possible values exceeds 100 (or was it 200?):
set F1Selections=src.GetPossibleValues(1000)

Could you please copy your macro completely? I suspect you've missed something(?)

Not applicable
Author

I think you would get the object required error message if you don't define src to be a valid field in your document. Verify that you have entered a valid field name in the line:

set src=ActiveDocument.Fields("F1")