Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vanderson009
Creator III
Creator III

Variable

What is the difference between variables that we are created in script and under setting tab -> variable definition.

Regards,

Villyee

8 Replies
hhajjali
Contributor III
Contributor III

Hello,

There are no differences, but usually variable you create in load script are variable you need to use in your loadscript and you will still find them in your application. I am not sure if variables created in application can also be used in load script, I think yes once they are created.

Best Regards

Anil_Babu_Samineni

The only different i notify here is some restricted. Like someone can not accessed to the script so and reload too. That means they can create variable user interface level.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ramasaisaksoft

Hi Anderson,

-->There is No difference for both variables.

-->As Anil said some people can hide the script so other developers are unable to modify/change the logic of the variable.

-->we can't create same name for the one variable .i mean if you created in script

let vact=sum(sales);

once you load the script it comes in variable Overview.

then you can't create the same name in Variable over overview

abhijith862
Contributor III
Contributor III

If you create in the setting tab you cannot use them in other applications where you call the source file as a binary while the variables declared in script/ qveditor can be used.

Regards,

Abhijith

jonathandienst
Partner - Champion III
Partner - Champion III

One more difference: if the variable does not exists before the load script runs (ie not in variable overview), AND the variable is created in the script and is nulled before the script completes, then the variable will not be available in the front end. This is a good way to clean out variables only used for script logic

Null the variable like this:


Let v1 = Null();

or

Set v1 = ;

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

both are same but variable created under setting tab are not available in the scripting but still you can use variables which are created ina script in the application.

Siva_Sankar
Master II
Master II

For deeper understanding of Qlikview variables..See our expert blog onThe Magic of Variables and  http://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptVariables...

-Siva

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Meaning that in your script you cannot clean out variables that were created in the Variable Overview. Or in a previous script run.

However, you can remove unwanted variables (or all of them if you have many and you don't use them anymore) at any time using a macro.