Setting Initial Selections in Version 9

A common Qlikview requirement is that when a user opens a document, some type of dynamic selection -- like current date -- should be made.

In QV 8 this entailed assigning a macro to the Document OnOpen event and using macro statements similar to this:

ActiveDocument.GetField("Year").Select ActiveDocument.Evaluate("year(today(1))")

The Actions feature of QV 9 has eliminated the need to use macros for initial selections. In V9, one or more Actions can be assigned to the Document OnOpen trigger. The actions may be "Select In Field" using a expression like =year(today(1)).

A very modular way to make Initial Selections in V9 is to make all the selections you require using search expressions and then save those as a Bookmark. The Bookmark can then be applied as the OnOpen Action.  For example, here are selections reflecting current Year, Month and Weekday using search expressions.


Example qvws that demonstrate initial selections in both V8 and V9 can be downloaded here http://robwunderlich.com/downloads/InitialSelectionsExample.zip


-Rob

Read the complete post at http://qlikviewnotes.blogspot.com/2010/02/setting-initial-selections-in-version-9.html


Posted 02/08/2010 01:05 by Qlikview Notes
Share
Feedback Form