Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Team,
how to promote or demote variables in variable overview(ctrl+alt+v).
Hi,
You can't promote or demote. you can sort it by clicking on the column name "Variable Name"
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.
the only way,u have to redefine accordingly however u like.
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.
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.
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
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.
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);
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