Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mallikarjun_h
Partner - Creator
Partner - Creator

is it possible to write expression immediatly after SET statement?

consider SET D = 11;

I want to write expression in place of "D" which will give output 'D' .................... is it possible because I am getting error.

3 Replies
tresesco
MVP
MVP

You can. But there would be questions, why do you want so? may be this will not serve your purpose; there could be a better option. You have to understand that whatever you write immediate after SET is expected to be a string that is place holder/variable name. If any keywoord is found there, qv parser might throw error. So, if you really need that you have to forcefully make qv understand that it's a string(variable name), like:

Set "Sum(A)"=11;

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You can use

SET "$(vVariableName)" = 11;

for dynamic variable creation. But that's about it.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

If I understand your requirements correctly, then this should work:

Let vVarName = <some expression that returns D>;

Set $(vVarName) = 11;

Set vVarName = ;     // to 'delete' vVarName if no longer needed

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein