Formula Language

Beginning in HCL Domino® 12, Formula Language can be used in Domino Query Language (DQL) search terms.

Formula Language provides full expression handling, intra-document field searches, and the ability to leverage an extensive library of @function calls.

Use the @FL (or @FORMULA, case insensitive) clause to encapsulate Formula Language syntax within DQL terms.

The following three examples use Formula Language in DQL terms, logically coupled with other terms using Boolean operators:
  • in ('f14') and @formula('@doclength < 2500') and @formula('@length(title) > 15') 
  • @fl('@Select(@Month(dob); "January"; "February"; "March";  "April"; "May"; "June"; "July"; "August";  "September"; "October"; "November"; "December")') = 'September'
  • @formula('@Matches(customer_responses;"reaction *": "belong *")') OR company_name contains (‘Acme’, ‘Consolidated’, ‘Tool*’)
Substitution variables may be used outside the @fl clause to allow for reuse of query text, for example:
  • @fl(‘@doclength’) > ?doclengthval and body contains (?bodyval)
  • @fl('@Select(@Month(dob); "January"; "February"; "March";  "April"; "May"; "June"; "July"; "August";  "September"; "October"; "November"; "December")') = ?monthstring 

Searches for terms specified in Formula Language scan NSF summaries. When combined (via AND or OR) with other terms that scan NSF summaries, one scan of document summaries satisifies all term searches. Terms that don't use NSF scanning cannot be combined.

Note the following Formula Language restrictions:
  • The maximum size allowed for a Formula Language text term is 256 bytes.
  • DQL doesn't test for error states prior to executing and doesn't validate documents found. It is up to you to validate syntax and semantics - that is, which documents match - your Formula Language terms.
  • Since several Formula Language constructs are heavily dependent upon context, not all Formula Language syntax is supported in DQL. The following @functions and syntactical components are allowed: