You can't do this (last I checked) because the views are stored in the database, and the key for the view is a hash of itself. A view cannot rely on outside data/logic/programming, because if it changes then the view is different and won't match. It confused me, and still does, so I may be wrong.