Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
Showing results for 
Search instead for 
Did you mean: 

access variable definitions from a text editor instead of variable overview tab

I inherited a QlikView document where the developer coded scores of variables in the Variable Overview screen. Working with this is a huge pain in the neck. Is there some way to access those definitions in a text file so I can make global replace edits and define dozens of new variables? Can this all be just moved to the load script?

I have not used variables that much; not sure what the difference of load script vs Variable Overview screen is if it matters. The variables are used in expressions. This was part of a plan to remove ridiculous complexity from the expressions, but now it's just buried in a hard to edit place.

5 Replies

LOAD Name,
(ooxml, embedded labels, table is Configurations);

Let Var_Script_Nr_var = NoOfRows('Variables');

For Var_Script_i = 0 to $(Var_Script_Nr_var)-1

Let Var_Script_Variable = Peek('Name', $(Var_Script_i), 'Variables');
Let Var_Script_Value = Peek('Value', $(Var_Script_i), 'Variables');

//create the variable and assign the value
Set '$(Var_Script_Variable)' = $(Var_Script_Value);





To help community find solutions, please don't forget to mark as correct.

that would have been a useful thing for the previous developer to investigate; however my problem is how to edit the existing definitions or move them into a text file. I suppose I can copy paste once and be done. Similar issues with the expressions...I wish there were a way to work around the graphical interface and code things directly.

Master II
Master II

Did you looked at "Expression Overview" window, where you can export all the chart expressions ?

MVP & Luminary
MVP & Luminary

You could get this information (and many others too) if you load the qvw within another qvw as xml-file. Because of the fact that so all document/object properties are available it needs some time to pick the wanted ones from there. In various goverment-tools (document analyzer, goverment dashboard, ...) are also such meta-data included and therefore you might find them there easier.

Maybe faster as that could be just to open the qvw within an editor like notepad++ and just to use the old-fashion approach of CTRL + F, CTRL + C and CTRL + V.

Beside this - the aim of variables is to simplify things, for example to reduce redundancy for often used expressions / expression-parts. Just to move (nearly) all expressions into variables and/or transferring the (really needed ?) complexity there is rather the opposite. Therefore I suggest to rethink the whole approach.

- Marcus

Support (Former)
Support (Former)

Dave, hopefully you have not yet gone through things manually, as I think I have a means to get things a bit more easily, may still require a little work, but not likely as much as manually doing things.  So, what you want to do is use a decent text editor to open the .qvw file in question.  I use NotePad++, once the file is open, the top part is going to be machine language, but down toward the bottom with be readable meta data, and in that section you will fine all of the variables listed out.  If you copy/paste that section into a spreadsheet, I think you can then likely load it back into another qvw file to be able to create a table object that you could export or print out etc. from there.  

What I did when I opened the file was just did a search on 'variable' that got me to the section I needed pretty quickly.  Hopefully this helps, shout if you have questions, but I think this will be easier.  I am not sure why we do not have the ability to export the variables either, may have to mention that to the engineers, but this should give you a decent workaround.

Oh, I thought of one other thing as well, the Governance Dashboard might get you what you need too, I cannot recall if it allows you to look at the variables in an app in a table view or not, but if you did not check that, that might be a good thing to try as well.  It is available on the download site.


To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.