Service Manager powered by HEAT

Working with Built-in Functions

Function Information
Notes on "Enabled For"
Default Arguments in Functions
About Executing Business Rules on Clients
About Deprecated Functions

Function Information

Built-in functions can be used in various places:

As parameters for search and dashboard queries.
As values or expression members in quick actions.
As values or expression members in object and relationship rules.
As values in workflow objects.
As values in reports.

Each function description contains the following information:

Name of the function.
Brief description of the function.
Syntax of the function.
The business objects for which this function is enabled. See Notes on "Enabled For" for more information.
Input parameters for the function. These inputs can be literals, field references, function calls, text concatenation, expressions, and so on. For details on expressions, see About Expressions.
The type of value that the function returns. Possible values are as follows:
Text
DateTime
Boolean
Number
Unicode text
Fixed text
Currency
List of text items (only valid in certain areas)
Regular expression
An example of how the function is used.

Notes on "Enabled For"

The "Enabled For" section includes the following areas:

Business Rules: Before-Save Rules
Business Rules: Calculation (After Save, with or without Also Recalculate on Load)
Business Rules: Calculation (Before Save or Always, without Also Recalculate On Load)
Business Rules: Calculation (Before Save or Always, with Also Recalculate On Load)
Business Rules: Editing Rules
Business Rules: Initialization Rules
Business Rules: Read-Only Rules, Required Rules, Validation Rules. This includes regular expression validation rules.
Client Expressions. This includes form style, visibility, and toolbar expressions.
Object Permissions
Services. This includes workflows and escalation. In future releases, we may add more services.
LDAP
Mobile
Quick Actions except for the user interface quick actions.
UI Quick Actions
Reports
Search/Dashboard without Field References
Search/Dashboard with Field References. See Searching for Related Business Objects in a Saved Search for information about searching with field references.

Default Arguments in Functions

Almost every built-in function has arguments. Some arguments are required and some are optional. If you leave out an optional arguments, the function uses a default value.

You can use an underscore or leave the argument blank. If you leave it blank, the system inserts an underscore.

For example, the EndOfQuarter() function takes three optional arguments. Therefore, the following are all equivalent:

$(EndOfQuarter())
$(EndOfQuarter(,,,))
$(EndOfQuarter(_,_,_))

About Executing Business Rules on Clients

Business rules and their associated expressions are executed in several places:

On the client
On the server
As part of a Microsoft SQL query
On the mobile client

Visibility rules and read-only rules are always executed on the client only. They are translated to JavaScript and executed within the browser of the user. While some of the data from the server is transferred to the client, not all of it can be for performance reasons, and therefore what client-executed business rules can do is necessarily limited.

See About Using Values in Expressions for information about using 64-bit integers versus 32-bit integers.

About Deprecated Functions

Certain functions are deprecated. Expressions with these functions work; however, you cannot edit them and you cannot add new expressions with these functions.

The deprecated functions are:

SearchHierarchy
SearchList
CurrentUserInfo1
CurrentUserName
UserPresence
GetActionVariable
AuditHistoryDescription
CurrentGlobalCurrency

Several functions will be deprecated in a future release.  Expressions with these functions work and you can use them; however, the system displays a message that they will be deprecated. If possible, do not use these functions.

The functions that will be deprecated in a future release are:

DateAdd
DatePart
EndOfNextYear
EndOfThisMonth
EndOfThisYear
HOPCalcTargetDate
Last365Days
Last3Months
Last90Days
LastDays
LastSevenDays
LastThirtyDays
LastWeeks
LastYears
NextDays
PromptAndExecuteAction
StartOfNextYear
StartOfPreviousMonth
StartOfThisMonth
StartOfThisYear
ToClientTime
Today
Tomorrow
Yesterday

Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other