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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Passing the variable into SQL script in qlikview

Hi,

I am new to Qlikview. I created two variables in my qvw file. Here is my variable names

vSelectedValue = GetFieldSelections(fm)

vPassedValue = GetFieldSelections(pm)

When i select the list box i got the values and displayed in text object. My question is i am going to use these variables into my sql script where clause.  Here is my sql script.

select  *

from    mvdate md,

        mvpicture mv

where   trunc(md.day)=trunc(mv.dates)   

and mv.mvpicture='$(fm)';

Please let me know anyone how to pass the variable in my sql script.

Thanks

Venkata

2 Replies
Not applicable
Author

Hi Venkat,

Did you get solution for this ? I am looking for similar question. Let me know if you get any possible solution.

Thanks,

Pavan

rubenmarin

Hi Pavan, altough i don't think it's a best practice, you can set a trigger to the field (In document properties->triggers), this trigger can assign the value to the variable (action --> external --> set variable)

In variable set the name of the variable and in value set "=FieldName" or "=Concat(FieldName, [separator])" if you want to allow multiple values.

This way the variable will contain the values, the other way the variable still contains the string "GetFieldSelections(fm)"