AddFormula (NotesQueryResultsProcessor - Lotuscript)
Provides Domino formula language to override the data used to generate values for a particular sort column and an input collection or set of collections. Since input collections can be created from different databases, design differences can be adjusted using addFormula to produce homogenous values in the output.
Defined in
Syntax
Call notesQueryResultsProcessor.AddFormula(String Formula, String ColumnName, String ReferenceName)
Parameters
Formula
String. Formula language string to be evaluated in order to supply the values for a sort column.
ColumnName
String. String value responding the programmatic name of the sort column whose values are to be generated using the formula language supplied.
ReferenceName
String. Used to specify the input collection names to which will use the formula language to generate sort column values. Wildcards may be specified to map to multiple input collection names.
Example
Dim qrp As NotesQueryResultsProcessor
Set qrp = notesDatabase.CreateQueryResultsProcessor
…
‘ case 1 - overrides values For sales_person column in rslts1
Call qrp.Addformula("@lowercase(sales_person + foo)", _
"sales_person", "rslts1")
‘ overrides values For sales_person column In rslts2
Call qrp.AddFormula("@Lowercase(sales_first + ' ' + sales_last)", _
"sales_person", "rslts2")
‘ overrides ordno_adjusted column values for collection names matching rslts*
Call qrp.addFormula("ordno + 10000", "ordno_adjusted", "rslts*")
‘ case 2. override column names against the categorized, aggregate case described in AddColumn:
‘ supplies a 5% raise for across a categorized set of results
Call qrp.addFormula(“salary*1.05”, “salwithraise”, “coll*”)
‘ constucts the fullname value from 2 other fields
Call qrp.addFormula(“firstname + “ “ + lastname”, “Fullname”, “coll*”)