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:

    @Abs

    @Accessed

    @ACos

    @Adjust

    @Ascii

    @ASin

    @ATan

    @ATan2

    @AttachmentLengths

    @AttachmentModifiedTimes

    @AttachmentNames

    @Attachments

    @Author

    @Begins

    @BrowserInfo

    @BusinessDays

    @Certificate

    @Char

    @ClientType

    @Compare

    @ConfigFile

    @Contains

    @Cos

    @Count

    @Created

    @Date

    @Day

    @DbColumn

    @DbExists

    @DbLookup

    @DbName

    @DbTitle

    DEFAULT

    @DocFields

    @DocLength

    @DocOmmittedLength

    @DocumentUniqueID

    @Elements

    @Ends

    @Exp

    @FileDir

    @FloatEq

    @FontList

    @GetAddressBooks

    @GetCurrentTimeZone

    @GetHTTPHeader

    @GetPortsList

    @HashPassword

    @Hour

    @Implode

    @Integer

    @IsAppInstalled

    @IsAvailable

    @IsDocTruncated

    @IsInCompositeApp

    @IsMember

    @IsModalHelp

    @IsNotMember

    @IsNull

    @IsNumber

    @IsResponseDoc

    @IsText

    @IsTime

    @IsUnavailable

    @Keywords

    @LanguagePreference

    @LDAPServer

    @Left

    @LeftBack

    @Length

    @Like

    @Ln

    @Locale

    @Log

    @LowerCase

    @MailDbName

    @MailEncryptSavedPreference

    @MailEncryptSentPreference

    @MailSavePreference

    @MailSignPreference

    @Matches

    @Max

    @Member

    @Middle

    @MiddleBack

    @Min

    @Minute

    @Modified

    @Modulo

    @Month

    @Name

    @Narrow

    @NoteID

    @Now

    @OptimizeMailAddress

    @OrgDir

    @Pi

    @Platform

    @Power

    @ProperCase

    @Random

    REM

    @Repeat

    @Replace

    @ReplaceSubstring

    @ReplicaID

    @Right

    @RightBack

    @Round

    @Second

    @Select

    @ServerAccess

    @ServerName

    @Set

    @Sign

    @Sin

    @Sort

    @Soundex

    @Sqrt

    @Subset

    @Sum

    @Tan

    @TemplateVersion

    @Text

    @TextToNumber

    @TextToTime

    @Time

    @TimeMerge

    @TimeToTextInZone

    @TimeZoneToText

    @Today

    @Tomorrow

    @ToNumber

    @ToTime

    @Transform

    @Trim

    @Unique

    @UpperCase

    @URLDecode

    @URLEncode

    @URLGetHeader

    @URLHistory

    @UrlQueryString

    @UserAccess

    @UserName

    @UserNameLanguage

    @UserNamesList

    @UserRoles

    @ValidateInternetAddress

    @VerifyPassword

    @Version

    @WebDbName

    @Weekday

    @WhichFolders

    @Wide

    @Word

    @Year

    @Yesterday

    @Zone