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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Passing a field value to another field

Hi,

I want to pass the values selected in 'Field 1' as a filter for 'Field 2'. I tried using a variable to get the selected values of 'Field 1' and pass the variable value to 'Field 2' using set analysis. But, the variable value is always null. The variable definition I used is given below:


getFieldSelections([Field 1])


I am not sure why the variable is not getting the selected 'Field 1' values. Is there any other way to resolve this?

Thanks in advance.

-Haneesh

14 Replies
sparur
Specialist II
Specialist II

in your variable you should use this value:

=getselectedvalue(Field1)

I think earlier you used value without equal sign.

Not applicable
Author

agree with Anatoly. 😄

You can achieve this even without trigger. Also if your field has more than one word enclose them with brackets ex:


=GetFieldSelections( [Field Name Here])


Not applicable
Author

Got it.

The reason was that my variable name has a space in between (v_Product Name) and so, the selected values were not displayed. Now changed the variable name and it is working.

Thanks a lot for all your help.

Cheers,

Haneesh

Not applicable
Author

HI sparur,

May I ask - in your test.qvw, when you are changing selections in Field1, how are you getting that to change the Variable1 value please ? I just cannot see it ...

Thanks

Bpb

Not applicable
Author

HI, don't worry - worked it out thanks !!