Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Find the use of a variable

Hi Folks

Does anybody know how I could go about checking where a certain variable is used within a QVW app, I have problems with some variables being reset or overwritten and would like to change the way they are used, but I need to know then which objects must be changed.

Any ideas warmly accepted,

9 Replies
GabrielAraya
Employee
Employee

Hi ... Settings .. Expression Overview ... There you can do a Find to search your variable ..

Not applicable
Author

You may be able to use the Variable Event Triggers to notify you when a variable value is changed. That could help if you are testing out some functionality and want to find what is causing the change. Unfortunately, you'd have to initiate whatever action it was that made the change. You'd also have to track down what exactly is doing the triggering, which could be difficult in a complex app.

Not applicable
Author

Sorry for the double-post, but I didn't see gaa's answer before posting (and if I did, I probably wouldn't have posted Big Smile). I've never even looked at the Expression Overview before and it's sitting right there on the Settings menu. That looks like it could be very useful. You can even sort by expression and then turn like expressions into a variable expression for simplicity. You learn something new every day.

Good tip!

Not applicable
Author

Expression overview......

I, like NMiller, have never even been into it and it does look like it could be really usefull, I do have a little caveat to that though.

Search for vSelectedFinancialField and it first finds vSelectedFund, click on next and it does then find an example of vSelectedFinancialField. This would be a great function if it actually searched on the whole text I have entered rather than first x number of characters.

Anyway, I think I can use this so thanks very much for the tip.

Not applicable
Author

Omg. You just made my life so much easier 😉 Great tip! Thank you very much!
johnw
Champion III
Champion III

You may also want to download Rob Wunderlich's document analyzer from:

http://www.robwunderlich.com/Download.html

It looks at what fields are actually used in your application, and where. There's a tab for variables, but I don't use enough variables to know if it's good information or not. Handy tool that I constantly forget to use.

Not applicable
Author

NOTE TO ALL

I have been trying to make use of this search feature whilst trying to tidy up lists of variables, so what I'm doing is to search for a variable using this feature, and if I don't find it in an expression then remove it.

I have more than one example where I have now removed variables that are in use in show conditions, and those are definately not found in the expression search window. Unfortunately for me, this makes the function 100% useless, because if you cannot rely on it 100% then it simply cannot be used.

Shame, a feature that could be very helpfull.....

johnw
Champion III
Champion III

I wouldn't call it 100% useless. Let's say you have 100 variables, and the search window finds 90 of them. You only have 10 variables to check manually instead of 100. That's quite helpful in my opinion.

Still, it certainly seems that the show expressions should be in the expression search window. Sounds like a feature request to me.

I believe that problems like this are why Rob Wunderlich used an XML export of all of the objects in his analyzer, and then did a search through the export instead of relying on the expression search window.

Not applicable
Author

Hi John

You probably detected a little frustration in my last post, you're right, not 100% useless but unless you understand the limitations its actually quite dangerous.

I used it to check the use of variables because I knew I had many variables no longer being used, unfortunately until I had the evidence above I was relying on this as gospel, so I went ahead and deleted 13 or 14 complex variables that were not being used. Sadly, they were all being used, I am now in the process of copy/pasting from a previous version out of source control.

So now you understand the frustration!