I have a bunch of documents categorized in a view by Year: 2001, 2002, 2003, 2004, 2005… 5 categories at this point.
I am attempting to get the names of each of the categories (years). I was doing something like (pseudo):
While Not ( doc Is Nothing )
(check for unique value etc)
unique? Then … blahblahblah = doc.ColumnValues(0
)
Set doc = view.GetNextDocument( doc )
Wend
But it seems to be a very intensive operation. . . which makes sense considering it is sifting through every document looking for unique year column values.
Is there a way in LotusScript to just get the 5 category / column values I want without ripping through the entire db?
In a categorized view, you can use Evaluate with @DbColumn. In a categorised column, it returns only the category values used as a “uniqued” array in a Variant. From VB/VBA, use Session.Evaluate. The only problem with doing it through VB/VBA is that you don’t get the alternative string delimiters, so you need to futz a bit getting the quotes in the macro string right.