Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
anat
Master
Master

promote & demote variables in variable overview(ctrl+alt+v)

Team,

how to promote or demote variables in variable overview(ctrl+alt+v).

10 Replies
Not applicable

Hi,

You can't promote or demote. you can sort it by clicking on the column name "Variable Name"

Peter_Cammaert
Partner - Champion III
Partner - Champion III

There isn't any use in promoting/demoting the variable list as this is a historical (creation) order en not an order of execution, initialization or dependency.

buzzy996
Master II
Master II

the only way,u have to redefine accordingly however u like.

rubenmarin

I never did this, just an idea right now, but you can use the comment fields as some kind of sort field. Start the comments with the order of the variable:

Var1: 0100 ...

Var2: 0200 ...

It's a string sort and manually sorted introducing the number so it will be awfull to manage with too many variables, but at least it's one possibility.

I usually prefer variable prefixes ('vsNameVariable', 'vuNameVariable', 'vKPINameVariable',...) to group variables, maybe a mix of both "techniques" has any use to you.

anat
Master
Master
Author

i have created below variables in my doc

 

VRevenue
Vexpenses
VRevenueCurrentYear
VExpensesCurrentYear
VRevenueLastYear
VExpensesLastYear
VRevenueThisMonth
VExpensesThisMonth
VRevenueLastMonth

VExpensesLastMonth

here i want to arrange all Revenue related variables in one by one and Expenses related variables in sequence.

nigel987
Creator II
Creator II

Hi Ananth,

if you want to have the variables in a defined order in the Variable Overview, you could set the variables in the script. This  solution has some other advantages:

- I think it's easier to maintain the list of variables as you have a single screen where you can see all your variables

- If you import the variables from a text file to the script, you do not loose all your expression in case your application is corrupt (this happened to me).

All the best,

Nihal

rubenmarin

As said by other users, there is no option to promote or demote, the default order is datetime of the variable creation, so you'll need to click the name caption to sort variables by name.

Another option is to use an InputBox, the QV object where you can add variables, in this object you can promote and demote variables, also you can pick the variables to show. Althought it needs manual operation to add new variables.

markodonovan
Specialist
Specialist

Hi there,

I had a problem recently where I had many variables in my document, in the end I decided to store them in excel.

This video from Richard.Pearce60 will show you how :

QlikView #023: Storing expressions into a data island - YouTube

When developing I just use a partial load to read the variables spreadsheet.

Hope this helps

Mark

techstuffy.tv

//Reload variables

//If Partial reload - only update the variables from the spreadsheet

if(IsPartialReload()) then

TRACE 'Partial Reload';

    vars:

    REPLACE LOAD ID,

         VAR

    FROM

    opkpi2_vars_test.xlsx

    (ooxml, embedded labels, table is Sheet1);

   

    exit Script;

ENDIF

//Load the variables from the excel spreadsheet - full reload

vars:

LOAD

    ID,

    VAR

FROM

opkpi2_vars_test.xlsx

(ooxml, embedded labels, table is Sheet1);

nigel987
Creator II
Creator II

Hi Mark,

I'm not sure if we are doing exactly the same, but I have a text file (named ExpressionsFile.txt) where all my expressions are stored. And in the script I just need to write:

$(Must_Include=..\Documents\ExpressionsFile.txt);

KR, Nigel