Sunday, February 12, 2012

Expression Overview - Find/Replace

The desktop QlikView Expression Overview is a useful tool for searching expressions in a document or doing a Find/Replace on terms and values in the expressions (from the desktop menu Settings->Expression Overview). Many people put expressions or parts of expressions into document variables mainly so that they have only one thing to change when the expression needs to change instead of changing individual expressions in multiple places in a document. With the Find/Replace functionality you can accomplish the same thing: make the change in only one place and effect the changes wherever needed throughout the document.

If you use text expressions for column labels and object titles then the Find/Replace function can change those too. Find/Replace will also change text in the expression comments; something I find useful since comments often refer to field names and function names. Some people put a little label or tag in a comment line in the expression to help them find those specific expressions later. For example, you might put a comment in the expression that looks like this, /* Tushar, please review this */ to help a quality review person find the expressions that need to be reviewed. (To make a comment in the expression either put /* before the comment and */ after the comment, or, use // to indicate that the remainder of the line is a comment.)

One thing to remember is that the Find or Find/Replace will not find hidden objects. When I am using Find/Replace functionality on a document with hidden objects I usually change the document properties Security tab and click on Show All Sheets and Objects. Then, Find/Replace can make a change to all expressions, even those on the hidden objects. After making the change, update the Security tab again to uncheck the Show All Sheets and Objects box.

If you want Find/Replace to avoid changing expressions in a particular object then you can temporarily hide the object while making the Find/Replace changes. To temporarily hide an object go the object properties and type 0 into the Show Condition (type a zero character). After the Find/Replace changes are finished, go to Document Properties, Security tab and click the Show All Sheets and Objects check box. Then, find your object and clear the Show Condition box in object properties. Go back to the Security tab and uncheck Show All Sheets and Objects and your temporarily hidden objects are visible again.

* * *


daan.koster A_T said...

Hi Tim,

Nice posting, i was not aware of the "feature" that the search is excluding the hidden objects. Thank you for sharing this knowledge!

Tip from my side: Do you know the toggle show/hide all objects short cut? ==> Crtl+Shift+S

regards Daan Koster

rick stephen said...

nice blog. thanks for sharing. Would like to add that If you want to get a quick overview of all expressions in an application then the Expression Overview is the place to visit. Select Settings->Expression Overview or type ctrl+alt+e as a shortcut.
You can filter on different types of expressions and the find/replace is a great feature to use when the list becomes too long to overview.
Pay some some attention not only to Chart Expressions but also the others, especially Show Conditions.

The Expression Overview is one of the most important places to go if you have an application that doesn't perform the way you expect. See future Quick Tips for some of the things to look out for when it comes to expressions.
Newbies seeking more info may visit this page-

chhavi singhal said...

Nice Blog.
But i had a doubt.
What if i want to change the expression in the 'Show Conditional' only(Via expression overview)?