I find interesting that most new Notes programmers could use a crash course in @formulas. For the most part they underestimate the power of @formulas and how easy it is to integrate in LS code. The Evaluate function when combined with the appropriate @formula could save you tons of time. As an example, here is a piece of code that allows me to redirect user when an agent is executed:
Code
'-- this sample code redirects a user to a thank you page. After the agent has been executed. The Evaluate function, replaces the / to and the spaces to "+"
'--
Dim strDBName as string
Dim varDBName as string
varDBName=Evaluate({
@ReplaceSubstring(@subset(@dbname;-1);
"//":" ";"":"+")})
strDBName=varDBName(0)
Print "[/"+strDBName+"/pgthankyou?openpage]"