What Are Functions and Commands?

Formula Language can be divided into two groupings@Functions and @Commands.These groupings comprise Formula Language and are used to create formulas.

Functions are used to return a value and can be placed anywhere within a formula. Although most functions simply return a value, some functions interact with users or trigger other actions to occur. For example, the @Prompt and @PickList functions can be used to request input from the user.

As you gain experience with Formula Language, you'll find that most formulas are built using functions. However, some functions can only be used in specific design objects. The following table lists some of the restricted functions and describes where they can be used.


[Pages 100 - 101]

Restricted Function

Design Objects That Can Use This Function

@All

Replication formulas, agents, and view selection formulas

@AllChildren

Replication formulas and view selection formulas

@AllDescendants

Replication formulas and view selection formulas

@Command

Toolbar buttons, manual agents, and action hotspots

@DBColumn

Toolbar buttons, actions, hotspots, fields, and agent (except mail)

@DBLookup

Toolbar buttons, actions, hotspots, fields, and agent (except mail)

@DeleteDocument

Agents

@DeleteField

Agents and fields

@DocChildren

Column formulas and window title formulas

@DocDescendants

Column formulas and window title formulas

@DocLevel

Column formulas and window title formulas

@DocMark

Agents

@DocNumber

Column formulas and window title formulas

@DocParentNumber

Column formulas and window title formulas

@DocSiblings

Column formulas and window title formulas

@Failure

Field validation formulas

ENVIRONMENT

All formulas with the exception of popup hotspots

@Environment

All formulas with the exception of popup hotspots

FIELD

Toolbar buttons, agents, action hotspots, and fields

@IsCategory

Column formulas

@IsDocBeingLoaded

Forms and fields

@IsDocBeingMailed

Buttons, hotspots, and fields

@IsDocBeingRecalculated

Buttons, hotspots, and fields

@IsDocBeingSaved

Buttons, hotspots, and fields

@IsExpandable

Column formulas

@IsNewDoc

Toolbar buttons, window title formulas, forms, and fields

@MailSend

Toolbar buttons, agents, action hotspots, and fields

@PickList

Toolbar buttons, manual agents, action hotspots, and fields

@Platform

Toolbar buttons, manual agents, hotspots, view design (with the exception of selection and column formulas), forms, and fields

@Prompt

Toolbar buttons, manual agents, action hotspots, and fields

@Responses

Window title formulas and fields

@Return

Toolbar buttons, agents, hotspots, and fields

SELECT

Replication formulas, agents, and view selection formulas

@SetDocField

Toolbar buttons, agents, action hotspots, and fields

@SetEnvironment

All formulas with the exception of popup hotspots

@SetField

Toolbar buttons, agents, action hotspots, and fields

@Success

Validation formulas

@Unavailable

Agents, views, and action buttons

@ViewTitle

Agents, action hotspots, and buttons

Note

A select number of functions can be called from LotusScript or have equivalents in LotusScript. Functions are sometimes called from LotusScript to simplify the code instructions. In other words, a single @Function can often replace multiple LotusScript code. In other cases, there are equivalent functions already included in the LotusScript language.

Категории