I am creating a user activated Lotus Script Agent that does multiple evaluate(@dblookup…)'s on a view to populate a variant.
total=Evaluate(|@dblookup(“”;“”:“”;“TopDownTotals_Export”;“| + customerList(x) + |” ;2)|)
The view has a selection formula that contains a variable created from an @today command.
currentYear:=@year(@now);
The variable, currentYear, is used in the rest of the view selection formula.
SELECT (@Left(Status ; 3) = “Com” | Status = “Bond” | Status = “Hold For Art” | @Left(Status ; 2) = “In” | Status = “Out For Approval” | Status = “Printing” | Status = “Top Coat” | @Left(Status ; 4) = “Wait”) & @Year(@Date(@If(@IsText(DateIn) ; @TextToTime(DateIn) ; DateIn))) = currentYear
My problem is that the agent slows painfully down while doing the evaluate(@dblookup…).
I know that the @today command is at least partially to blame. When I change it to a constant (currentYear:=2005, the lookups go from 15-25 seconds each to 3-5 seconds each.
Still too slow though since the agent will be doing a lookup over 400 times to create a spreadsheet on demand. Plus, I really need this view to be dynamic in selecting only the current years documents.
The view only contains 4,200 documents. Is there something I can do, or another way to approach this to obtain faster lookups in this Agent?
Thank you for any help.