Substring0

Returns a string containing a substring of consecutive characters from another string.

This function can be used to replace the Left and Right modifiers as used in CSM.

Syntax

Substring0(text,startPosition,length)

Enabled For

For a description of the business object categories, see Notes on "Enabled For".

Business Object Category Yes/No
Business Rules: Before-Save Rules Yes
Business Rules: Calculation Rules (After Save, with or without Also Recalculate on Load) Yes
Business Rules: Calculation Rules (Before Save or Always, without Also Recalculate On Load) Yes
Business Rules: Calculation Rules (Before Save or Always, with Recalculate On Load) Yes
Business Rules: Editing Rules Yes
Business Rules: Initialization Rules Yes
Business Rules: Read Only Rules Yes
Business Rules: Required Rules Yes
Business Rules: Validation Rules Yes
Client Expressions Yes
Object Permissions Yes
Services Yes
LDAP Yes
Mobile Yes
Quick Actions (except UI Quick Actions) Yes
UI Quick Actions Yes
Reports Yes
Search/Dashboard without field references Yes
Search/Dashboard with field references Yes

Parameters

Parameter Description

text

The text from which to extract the substring.

startPosition

The position of the first character to include in the output. The first character starts with position zero.

length

(Optional) The length of the substring.

Return Value

Text value.

Example

$(Substring0 (Symptom, 21, 7))

If the Symptom field in the business object being evaluated contains the following:

Printer seems to be working fine for others. His setup for the printer is fine.

The function skips the first 21 characters starting from zero and returns the substring starting with index 21 (the 22nd character). The returned string continues for 7 characters. The result in this example is "orking ". Note that the space after "orking" is counted as a character.

See also Substring().