Velocity

Velocity is a template language designed to generate content. This means that HTML, XML, JSON—or whatever format is needed—is enriched with data from the database, calculations, or other data sources. This can be used either to exchange data in a specific format or simply to display this content in the browser. Java objects provided by Intrexx are used to retrieve the data. However, it is also possible to include objects from your own Java classes. The API provides a range of methods for accessing key Intrexx features and objects.

You can find general information on "scripting" here.

Intrexx Standard Library

In the Velocity script editor, you can access the Intrexx default library in the Libraries section. Once you've selected an item in the library, you'll see the following buttons in the lower-right corner:

View description

Here you will find a description of the currently selected function, along with a sample script.

Open link

Provides links to relevant pages with additional information. This opens the specific page containing the classes, interfaces, methods, or properties that you can use for the currently selected function.

Application Structure

Application Information

Information about the application associated with the provided GUID.

Example

#set($appInfo = $RtCache.getApplication("C6F004594EEA424B2AACCD105181AD7F0660DF6D").getStartFupGuid())

Retrieves the GUID of the application's home page.

Snippet

$RtCache.getApplication("")

ApplicationInfo Interface

Starting with Intrexx 12.0.0: Interface ApplicationInfo

Data Group Information

Information about the data group with the specified GUID.

Example

#set($dgInfo = $RtCache.getDataGroup("93B1A993C5FCF2895C93E1B7BF3BDDC847DC2BCD").getName())

Retrieves the name of the data group.

Snippet

$RtCache.getDataGroup("")

DataGroupInfo Interface

Starting with Intrexx 12.0.0: Interface DataGroupInfo

Data Field Information

Information about the data field with the provided GUID.

Example

#set($fldInfo = $RtCache.getField("8E2B87AE9F9BD1FD2FE38AD6856347F3A0D358AD").getName())

Retrieves the name of the data field.

Snippet

$RtCache.getField("")

FieldInfo Interface

Starting with Intrexx 12.0.0: Interface FieldInfo

Page Information

Information about the page with the provided GUID.

Example

#set($pageInfo = $RtCache.getPage("D867C6B9AC0D17E3F524ED5A5E164463046F8F01")isEditPage())

Returns true if the page is an input page; otherwise, false.

Snippet

$RtCache.getPage("")

PageInfo Interface

Starting with Intrexx 12.0.0: Interface PageInfo

Current User

Current user's login name

Returns the login name of the current user.

Snippet

$User.getLoginName()

Interface IUser

Starting with Intrexx 12.0.0: Starting with Intrexx 12.0.0:

Current user's email address

Returns the current user's work email address.

Snippet

$User.getEmailBiz()

Interface IUser

Starting with Intrexx 12.0.0: Starting with Intrexx 12.0.0:

Determine a User's Group Membership

Determine the groups to which the currently logged-in user belongs and perform further processing based on that information.

Snippet

#set($groupGuids = ['EF16F15EDA8562E19D7CD56BF2E43001F119193C', '47DD42CF4203EFDC7B1596E0158BB5B1E810D583'])
#set($userMembership = $Portal.getOrgStructure().getMembershipSets($User))

##Returns true, if $User is member of at least one group, which is defined by its guid in $groupGuids
#if ($userMembership.intersects($groupGuids))
	##Not implemented yet
#end

Class VelocityOrgStructureWrapper

Starting with Intrexx 12.0.0: Class VelocityOrgStructureWrapper

Objects in the Velocity Context

$AccessController

Object used to verify access rights to applications, data groups, etc.

Snippet

$AccessController

Class IxAccessController

Starting with Intrexx 12.0.0: Class IxAccessController

$AppUserProfile

Store data persistently for each user.

Snippet

$AppUserProfile

Class VCApplicationUserProfile

Starting with Intrexx 12.0.0: Class VCApplicationUserProfile

$AsynchronousRequestHandler

Object for processing asynchronous requests.

Snippet

$AsynchronousRequestHandler

Class AsynchronousRequestHandlerCallable

Starting with Intrexx 12.0.0: Class AsynchronousRequestHandlerCallable

$BCM

Object used to access the Cache Manager and the Update Sequence Numbers (USN) of individual objects.

Snippet

##Gets the USN of the view page
$BCM.getUsn("viewpage971CA7D9")

Class BrowserCacheManager

Starting with Intrexx 12.0.0: Class BrowserCacheManager

$Binding

Access to all bindings that are available at the time of access.

System Data Groups

$Binding.getValue("systemDataGroup.dataField['SYSDGFIELD_GUID']", "defaultvalue").asString()

Here is an example of how to access a system data group.

$Binding.getValue("systemDataGroup['APP_GUID'].dataField['SYSDGFIELD_GUID']", "defaultvalue").asString()

It is also possible to access system data groups from other applications. To do this, enter the APP_GUID after "systemDataGroup."

Values from tables

$Binding.getValue("dataRange['<GUID of tablerecords>'].row['0'].control['<GUID of column / control>']")

Accessing values from a table—not possible for calculated values, multiple selections, or dynamic views.

The sample script returns an IIxValue.

To do this, use the GUIDs of the table records. This GUID can be determined when the table elements are displayed in the application structure. You can do this via the "Edit" main menu when the table is selected in the application structure.

$Binding.getValue("dataRange['<GUID of tablerecords>'].row['0'].control['<GUID of column / control>']").asString()
        

Returns an unformatted string.

$Renderer.renderDateTime($Binding.getValue("dataRange['<GUID of tablerecords>'].row['1'].control['<GUID of column / control>']").asValueHolder())
        

Returns a date as a string.

dataRange['<name of tablerecords>'].row['0'].control['<Name of column / control>']
        

Values can also be determined based on the names of the table records or table columns.

dataRange['<name of tablerecords>'].count
        

Returns the number of records displayed in the table.

dataRange['<name of tablerecords>'].totalCount
        

Returns the number of all records in the table, taking the filter into account.

dataRange['<name of tablerecords>'].row['0'].primaryKey
        

Returns the primary key or RecordId of the record.

Snippet

$Binding

Class IIx Value

Starting with Intrexx 12.0.0: Class IIxValue

$Browser

An object for retrieving browser information.

Snippet

##Gets the user agent string of the calling browser
$Browser.getUserAgentId()

Class BrowserCallable

Starting with Intrexx 12.0.0: Class BrowserCallable

$CalcUtil

Introduction

The following section introduces the Velocity context object "$CalcUtil" for calculating values and explains it using code examples.

The calculate() function can be used to perform complex calculations and comparisons.

Parentheses '( )' can be used to structure the operation. The values for the calculation and comparison operations to be performed can be retrieved from data fields, sessions, requests, table cells, or SharedStates.

Operators

The following operators are available in a calculation formula:

  • + (Addition)

  • - (Subtraction)

  • * (Multiplication)

  • / (Division)

  • < (See Kleiner)

  • > (Compare Larger)

  • <= (Less than or equal to)

  • >= (Greater than or equal to)

  • == (Comparison: Equal) ==

  • != (not equal to)

  • && (Logical "And" operator)

  • || (Logical "Or" operator)

  • ! (Logical "not" operator)

Additional Type Categories and Methods

In addition to the operators described above, there are other ways to call specific variables or methods in formulas:

Method

Description

Example

datafield

Value from a data field

datafield("C68F6...D3DE7")

datafieldAsNumber

Value from a data field as a number

datafieldAsNumber("C68F6...D3DE7")

session

Value from an existing session of the currently logged-in user

session("sessionValue")

sessionAsNumber

Value from an existing session of the currently logged-in user

sessionAsNumber("sessionValue")

sharedState

Value from the current processing context

sharedState("sharedStateValue")

sharedStateAsNumber

Value from the current processing context

sharedStateAsNumber("sharedStateValue")

requestAsNumber

Value from the current request

requestAsNumber("rq_requestValue")

abs

Absolute value

abs(-1)

For type specifications with the suffix AsNumber, the system attempts to cast the incoming values whenever technically possible. Without this cast, an exception will occur, for example, when using string data fields. The Boolean values "true" and "false" are cast to 1 and 0, respectively. Optionally, you can specify a fallback as the second method parameter, which is used if the first parameter is null or empty. This fallback value can also be a formula.

Snippet

//returns -1 if the access to the sharedState variable "sharedStateValue" returns null or the value is not set.
sharedState("sharedStateValue", -1)

//returns 5 if the access to the request variable "rq_custom" returns null zurückliefert or the value is not set.
requestAsNumber("rq_custom", (10/2))

//returns 0 if the data field contains null or is not set.
datafield("C68F6...D3DE7", 0)

Error Handling

To handle potential errors (e.g., division by 0), the following methods can be used in a formula:

Method

Description

Example

zeroOnError

Returns 0 in the event of an error

zeroOnError(10/0) == 0

oneOnError

Return 1 if an error occurs

oneOnError(10/0) == 1

fallbackOnError

If an error occurs, the value defined as the fallback is returned

fallbackOnError(10/0, 2) == 2

Rounding Functions

Numbers can be rounded in formulas. The "scale" parameter specifies the number of decimal places.

Method

Notes

roundLong

Accounting Rounding

roundLongHalfAwayFromZero

is equivalent to roundLong

roundLongHalfEven

roundLongHalfUp

roundLongHalfDown

round(scale)

Accounting rounding to scale decimal places (roundLong is equivalent to round(0))

roundLongHalfAwayFromZero(scale)

is equivalent to round(scale)

roundLongHalfEven(scale)

roundLongHalfUp(scale)

roundLongHalfDown(scale)

Case Distinctions

Case distinctions allow you to check preconditions in formulas and, based on the result, use specific formulas or values.

case(<booleanExpression>, <formula for true>, <formula for false>)

The following rules apply to Boolean expressions:

  • null == false

  • empty == false

  • 0 == false

  • false == false

  • !true == false

  • !false == true

  • 1 == true

When logical operators are used for calculations, false is treated as 0 and true as 1. Consequently, we get:

5 > 0 + 0 > -1 == 2

Examples

A calculation call using the "calculate()" function on view pages always has three parameters:

  • $ProcessingContext - The current processing context. The value is always fixed.

  • The current data range— $DC for tables and view pages.

  • Formula - Any nested formula consisting of the above-mentioned Methods and Operators.

Simple Addition of Two Values

Here is a simple example of an addition where the values are read from data fields. To access a data field, you can specify either the data field's GUID or the control's name enclosed in quotation marks.

Example 1

## Parameters of the methode calculate():
## $ProcessingContext (Fixed value)
## $DC 
## '<Name of the control of the 1st summand>'## <Operator>## '<Name of the control of the 2nd summand>'$CalcUtil.calculate($ProcessingContext, $DC, 'dataField("integervcontrol1") + dataField("integervcontrol2")')

##Same example, but here the GUID of the data field instead of the control is used
$CalcUtil.calculate($ProcessingContext, $DC, 'dataField("3BB...5B3") + dataField("C95...950")')

The methods described above can be combined and nested in any way to use values from various sources (session, request, ...).

Example 2

## Combination of data field and session value
$CalcUtil.calculate($ProcessingContext, $DC,'dataField("3BB...5B3") + session("calcutil_example")')

## Combination of data field and request value
$CalcUtil.calculate($ProcessingContext, $DC, 'dataField("floatcontrol02E5") + requestAsNumber("rq_calcUtil")')

## "Smaller" comparison of request value
#set($term = '(dataField("B5F472ED66DCA878683B52CE8F979F4F1DDA172B") * 2) + session("calcutil_value") <requestAsNumber("rq_calcUtil")')
$CalcUtil.calculate($ProcessingContext, $DC, $term)

## Case distinction of request value
#set($term = '(dataField("B5F472ED66DCA878683B52CE8F979F4F1DDA172B") * 2)')
$CalcUtil.calculate($ProcessingContext, $DC, "case(requestAsNumber('rq_calcUtil') <= 100, $term, -1)")

Aggregate Functions for Tables

Using "$CalcUtil," it is also possible to process values from columns in a table. The arithmetic operations listed in the following table are available for this purpose. Calls to methods for tables always have two parameters:

  • Table Object

    Access to a table—either by table name or table GUID. These are not the direct name and GUID of the table control, but rather the values of the "tablerecords" attribute for view tables or the "shapedtablebase" attribute for custom tables. To determine the values, select "Edit / Display Elements" from the main menu when the page containing the table is selected in the application structure. Then navigate to the desired table in the tree view. There you will find the entry "tablerecords" or "shapedtablebase." You can find the name and GUID in the entry's Details dialog.

  • Formula

    An arbitrarily nested formula. Accessing column values using row(<column_name>) or rowAsNumber(<column_name>)

Example 1

$CalcUtil.calculate($ProcessingContext, $DC, 'sum(table("8E9...1B3"), row("integervcontrol3621234C"))')
$CalcUtil.calculate($ProcessingContext, $DC, 'sum(table("8E9...1B3"), row("integervcontrol3621234C"))')

The values are calculated when the page is loaded. If the table contains navigation elements and these are being used, the values of the Velocity statements and calculations do not update because the table is dynamically reloaded via AJAX. Therefore, if you want to perform table calculations even after navigating within the table, the corresponding VTL include (or VM file) must also be reloaded via AJAX. As a workaround, it is recommended to format the table to be calculated so that no navigation is required.


Method

Description

sum

Calculates the sum of the column values from the data displayed on the current page.

min

Calculates the minimum of the column values from the data displayed on the current page.

max

Calculates the maximum of the column values from the data displayed on the current page.

count

Calculates the number of records displayed on the current page.

Please note that the following methods involve computationally intensive operations. With very large datasets, delays may occur.

Method

Description

totalSum

Calculates the sum of the column values for all records.

totalMin

Calculates the minimum of the column values for all records.

totalMax

Calculates the maximum of the column values for all records.

totalCount

Calculates the number of all records.

Please note: If there are no records in a table, the above-mentioned Methods return the number 0.

Example 2

## Example output of an info text below an article table
#set($sum = 'totalSum(table("8E9F10DCB24CBB4B27FF67A3230CE7753521E1B3"), row("integervcontrol3621234C"))')
#set($count = 'totalCount(table("8E9F10DCB24CBB4B27FF67A3230CE7753521E1B3"), row("floatvcontrol256AC41"))')
$CalcUtil.calculate($ProcessingContext, $DC, $count) items were ordered in a total value 
of $CalcUtil.calculate($ProcessingContext, $DC, $sum) €

$Chat

An object for sending and receiving chat messages.

Snippet

$Chat

Class ChatProxy

Starting with Intrexx 12.0.0: Class ChatProxy

$Codec

An object for encoding and decoding strings.

Snippet

$Codec.hexEncodeString("www.intrexx.com", "UTF-8")
$Codec.hexDecodeString("7777772E696E74726578782E636F6D")

Class Codec

Starting with Intrexx 12.0.0: Class Codec

$CollectionFactory

Object for creating collections.

Snippet

$CollectionFactory.createMap()

Class CollectionFactory

Starting with Intrexx 12.0.0: Class CollectionFactory

$Constants

An object used to access a class's constants.

Snippet

$Constants

Class Constants

Starting with Intrexx 12.0.0: Class Constants

$Cookies

Setting cookies.

Snippet

#set($cookie = $Cookies.createCookie("myCookie", "test"))
$Response.addCookie($cookie)

Class Cookies

Starting with Intrexx 12.0.0: Class Cookies

$DC

There are three types of data records that must be distinguished in relation to $DC and $drRecord:

1. Main Data Set

The main dataset is displayed on a single page using simple elements such as text fields, checkboxes, etc.

2. Record in a view table

The view table consists of a list of several records. A single row is a record in a view table.

3. Data record in a freely designed table

The custom table also displays a list of multiple data records. It differs from a standard view table in that the custom table uses its own page to display the data records, rather than just the raw data, as the view table does. Each repeated display of this page constitutes a data record in a freely designed table.

Accessing Various Values Using $DC and $drRecord

The use of $DC and $drRecord depends on the context or record type. If "Velocity" is written within the context of the main dataset—for example, using the "Static Text" element on the page—then $DC can be used to access data from the main dataset.

If Velocity is written in the context of a view table's record—for example, to pass data to a JavaScript call—$DC is used to access data from the main record, and $drRecord is used to access data from the respective record in the view table.

If Velocity is generated in the context of a record from a custom table—for example, because a static text block containing Velocity code is placed on the display page for each record—then

$DC.getMainPageDC()

used to access data from the main dataset. Both $DC and $drRecord can be used to access data from the respective record in the custom table.

 

Access to
Main Data Set

Access to
Current data set in the view table

Access to
Current data set in a freely formatted table

Velocity in the main dataset

$DC

not possible

not possible

Velocity in a view table's dataset

$DC

$drRecord

not possible

Velocity in the dataset of a custom table

$DC.getMainPageDC()

not possible

$DC or $drRecord

$Loader.getDataCollection()

The call $Loader.getDataCollection() is exactly the same as using $DC. It is simply a different, longer way of writing it. $Loader.getDataCollection() or $DC can be assigned to a new variable if necessary.

You must, without exception, use a completely unique name for this new variable—under no circumstances should you use $DC as the name! $DC is a reserved keyword in Intrexx. This applies to all names of the context objects available in Velocity within Intrexx.

Snippet

##Returns the record ID of the current record as string
$DC.getRecId()

Interface IWebRowDataCollection

Starting with Intrexx 12.0.0: Interface IWebRowDataCollection

2.3.13.1 Custom Settings in Emails

Manual initialization of the context object $DC (short for $Loader.getDataCollection()) for use in emails with content generated by Velocity. <APP_GUID> must be set to the GUID of the application from which records are to be processed. The following conditions must be met:

  • The process must be triggered by an event from the web

  • These are existing data sets

  • Objects (e.g., data fields) used in Velocity must be present as controls in the jump target

Snippet

#set($template = $Loader.process($ProcessingContext, "<APP_GUID>", "data"))
#set($DC = $Loader.getDataCollection())

Read the value from the control

Reading a value from a control (e.g., from a view field). The parameter must be the name of the control from which the value is to be retrieved. In a custom table, use the context object $drRecord instead of $DC.

Example

#set($value = $DC.getValueHolder('textvcontrol1234').getValue())

Snippet

#set($value = $DC.getValueHolder('<CONTROL_NAME>').getValue())

Read a value from a system data group

Reading a value from a system data group. The parameter must be the name of the data field from which the value is to be read. In a custom table, use the context object $drRecord instead of $DC.

Example

#set($value = $DC.getPropertiesVH().get("STR_COLUMN1").getValue()

Snippet

#set($value = $DC.getPropertiesVH().get("<DATAFIELD_NAME>").getValue()

$DEBUG

Object for a more detailed examination of individual objects and elements.

Snippet

##Provides detailed information about the current user object.
$DEBUG.inspect($User)

Class ObjectInspector

Starting with Intrexx 12.0.0: Class ObjectInspector

$defaultLanguage

The portal's default language.

Snippet

$defaultLanguage

$DataTransferCallable

Object for accessing established data transfer connections.

Snippet

##Returns the JobHistory of the data transfer job with the transferred GUID.
$DataTransferCallable.getJobExecutions("0460E20ACAC15EDDA0E9B62E1F815D5BFD3F9B8F")

Class DataTransferCallable

Starting with Intrexx 12.0.0: Class DataTransferCallable

$DbUtil

An object used to access database connections and manage transactions for database operations.

Snippet

#set($conn = $DbUtil.getConnection("IxSysDb"))

Class DatabaseUtil

Starting with Intrexx 12.0.0: Class DatabaseUtil

$DefaultMaker

Snippet

$DefaultMaker

Class DefaultMaker

Starting with Intrexx 12.0.0: Class DefaultMaker

$DistributionControl

Object for Accessing Distribution Controls

Snippet

$DistributionControl

Class VCDistributionControl

Starting with Intrexx 12.0.0: Class VCDistributionControl

$DoubletService

An auxiliary object for searching for duplicates in an application's data sets.

Snippet

$DoubletService

Class DoubletServiceCallable

Starting with Intrexx 12.0.0: Class DoubletServiceCallable

$drRecord

Object for accessing the current record in free tables. For more information, see the context object $DC.

Snippet

$drRecord

IWebRowDataCollection Interface

Starting with Intrexx 12.0.0: Interface IWebRowDataCollection

$DtUtil

Object for date calculations.

Snippet

$DtUtil

Class DateTimeUtil

Starting with Intrexx 12.0.0: Class DateTimeUtil

$ESC

List of characters that are escaped by default in Velocity.

Snippet

##Representation of a rhombus (#)
$ESC.getH()

Class EscapedCharacters

Starting with Intrexx 12.0.0: Class EscapedCharacters

$Error

Object for analyzing exceptions.

Snippet

$Error

Class ErrorObject

Starting with Intrexx 12.0.0: Class ErrorObject

$ExceptionUtil

An object used to throw exceptions.

Snippet

$ExceptionUtil.throwException("java.io.FileNotFoundException", "Die angegebene Datei existiert nicht.")

Class VelocityExceptionUtil

Starting with Intrexx 12.0.0: Class VelocityExceptionUtil

Objects for Microsoft Exchange

These objects can only be used in conjunction with the Intrexx Media Gateway.

$ExchangeCallable

Callable for Exchange authentication.

Snippet

$ExchangeCallable.getRequiredFields().isPasswordRequired()

Class ExchangeCallable

Starting with Intrexx 12.0.0: Class ExchangeCallable

$ExchangeConnectionCallable

Callable for Exchange connections.

Snippet

$ExchangeConnectionCallable.getConnection()

Class ExchangeConnectionCallable

Starting with Intrexx 12.0.0: Class ExchangeConnectionCallable

$ExchangeMailboxCallable

A callable for accessing an Exchange user's mailbox.

Snippet

##Returns the out of office message of the current Exchange user.
$ExchangeMailboxCallable.getOutOfOfficeMessage()

Class ExchangeMailboxCallable

Starting with Intrexx 12.0.0: Class ExchangeMailboxCallable

$ExchangeMessageCallable

Callable for accessing message objects.

Snippet

##Saves the message with ID $strMessageId in EML format under $strDestinationPath.
$ExchangeMessageCallable.saveMessageAsEML($strMessageId, $strDestinationPath)

Class ExchangeMessageCallable

Starting with Intrexx 12.0.0: Class ExchangeMessageCallable

$ExchangeItemCallable

Callable for accessing Exchange objects.

Snippet

##Stores attachments of the element with ID $strMessageId under $strDestinationPath.
$ExchangeItemCallable.saveAttachment($strMessageId, $strDestinationPath)

Class ExchangeItemCallable

Starting with Intrexx 12.0.0: Class ExchangeItemCallable

$ExchangeUserMailboxCallable

A callable that returns information about an Exchange user's mailbox.

Snippet

$ExchangeUserMailboxCallable.getMailboxInfo()

Class ExchangeUserMailboxCallable

Starting with Intrexx 12.0.0: Class ExchangeUserMailboxCallable

$Factory

Creating or accessing objects, such as users, without having predefined them in the Velocity context.

Snippet

$Factory

Class ObjectFactory

Starting with Intrexx 12.0.0: Class ObjectFactory

$FieldFormatter

Snippet

$FieldFormatter

Class FieldFormatter

Starting with Intrexx 12.0.0: Class FieldFormatter

$FileHelper

Object for file operations, such as inserting a file into an Intrexx data group.

Snippet

##Deletes the file from the data field defined with the GUID 
##and the data set defined with the RecID 1.
$FileHelper.deleteFileFromIntrexx($ProcessingContext, "079A397D11EE732857CD1017C3AC6A55D0D112DA", "1")

Class VCFileHelper

Starting with Intrexx 12.0.0: Class VCFileHelper

$FileUtil

An object used to analyze files in a folder hierarchy.

Snippet

$FileUtil

Class FileUtil

Starting with Intrexx 12.0.0: Class FileUtil

$Filter

A collection of various filters for Collections used in the Velocity context.

Snippet

$Filter

Class Filter

Starting with Intrexx 12.0.0: " " Class Filter

$HelperFactory

Converts the characters <, >, &, and " to their corresponding HTML entities.

Snippet

$HelperFactory

Class HelperFactory

Starting with Intrexx 12.0.0: Class HelperFactory

$I18N

Object for accessing language constants

Snippet

$I18N

Class LanguageConstantsCallable

Starting with Intrexx 12.0.0: Class LanguageConstantsCallable

$JSON

Helpful functions for creating and working with JSON objects.

Snippet

$JSON

Class JSONUtil

Starting with Intrexx 12.0.0: Class JSONUtil

$lang

Current portal language.

Snippet

$lang

$layout

Name of the layout currently in use.

Snippet

$layout

$LayoutManager

Access to layout information.

Snippet

$LayoutManager

Class LayoutManagerCallable

Starting with Intrexx 12.0.0: Class LayoutManagerCallable

$ListBoxControl

Object for accessing selection lists.

Snippet

$ListBoxControl

Class VCListBoxControl

Starting with Intrexx 12.0.0: Class VCListBoxControl

$ListFormatter

Help functions for formatting lists.

Snippet

$ListFormatter

Class ListFormatter

Starting with Intrexx 12.0.0: Class ListFormatter

$Loader

Processes incoming requests. For example, $Loader can be used to access the current database connection.

Snippet

$Loader

Class BuslogicCaller

Starting with Intrexx 12.0.0: Class BuslogicCaller

$Locales

Access to regional settings for number and date values.

Snippet

$Locales

Class VCLocales

Starting with Intrexx 12.0.0: Class VCLocales

$LogAnalyzer

Object for creating application, user, and statistics reports.

Snippet

$LogAnalyzer

Class LogAnalyzer

Starting with Intrexx 12.0.0: Class LogAnalyzer

$MBGallery

Object for editing and copying, moving, or deleting images.

Snippet

$MBGallery

Class Gallery

Starting with Intrexx 12.0.0: Class Gallery

$Math

An object for various arithmetic operations.

Snippet

$Math

Class MathUtil

Starting with Intrexx 12.0.0: Class MathUtil

$Menu

Object used to access the menu structure.

Snippet

$Menu

Class MenuCallable

Starting with Intrexx 12.0.0: Class MenuCallable

$MenuCloud

An object used to access a menu cloud.

Snippet

$MenuCloud

Class MenuCloud

Starting with Intrexx 12.0.0: Class MenuCloud

$ObjectHelper

Object for null objects and ValueHolders.

Snippet

$ObjectHelper

Class ObjectHelper

Starting with Intrexx 12.0.0: Class ObjectHelper

$PageUtil

An object used to access controls and data on the view page of a record.

Snippet

#set($renderer = $RendererFactory.getDefaultRenderingContext($ProcessingContext, $User, $lang))
#set($page = $PageUtil.process($RenderingContext, $ProcessingContext, $Request.get("rq_AppGuid"), $DC))

To initialize, you need the rendering and processing contexts, as well as the GUID of the current application and a DataCollection.

Example

$page.getControlNames()
## Sample output
## [textvcontrol60C5B1A8, datetimevcontrol88EFC15D, checkvcontrol68B97F7C, integervcontrolE018B980]

$page.getControlGuids()
## Sample output
## [4A21CF034953825EE93093E0C8E51C959D193C5F, 4B953139D2E394C42BD20919A2C1CA757EC10A1A]

The "$page" variable can be used to access controls and data fields on the page.

Class PageUtil

Starting with Intrexx 12.0.0: Class PageUtil

$Parameter

Object for accessing parameters.

Snippet

$Parameter

Class VCParameter

Starting with Intrexx 12.0.0: Class VCParameter

$PolicyBrowserFactory

Provides access to objects that can be used to read the permissions of users, sets, or containers.

Snippet

$PolicyBrowserFactory

Class Factory

Starting with Intrexx 12.0.0: Class Factory

$PollHelper

Object used to query the properties of a survey.

Snippet

$PollHelper

Class PollCallable

Starting with Intrexx 12.0.0: Class PollCallable

$Portal

Object used to access portal properties (e.g., name).

Snippet

$Portal

Class Portal

Starting with Intrexx 12.0.0: Class Portal

$Portal - Access to the Organizational Structure

Access to the portal's organizational structure.

Snippet

$Portal.getOrgStructure()

Class VelocityOrgStructureWrapper

Starting with Intrexx 12.0.0: Class VelocityOrgStructureWrapper

$PreparedQuery

An object for creating and executing database queries.

Snippet

$PreparedQuery

Class DbQuery

Starting with Intrexx 12.0.0: Class DbQuery

$ProcessingContext

The object of the current processing context.

Snippet

$ProcessingContext

Class BusinessLogicProcessingContext

Starting with Intrexx 12.0.0: Class BusinessLogicProcessingContext

$QNameFactory

Object for creating a new xsd:QName namespace.

Snippet

$QNameFactory

Class QNameFactory

Starting with Intrexx 12.0.0: Class QNameFactory

$Renderer

Object for creating various renderers.

Snippet

$Renderer

Class StandardUtilRendererFactory

Starting with Intrexx 12.0.0: Class StandardUtilRendererFactory

$RenderingContext

Object used to access the portal's current default rendering settings.

Snippet

$RenderingContext

Class RenderingContext

Starting with Intrexx 12.0.0: Class RenderingContext

$Request

Object for setting and reading request variables.

Snippet

$Request

Class IServerBridgeRequest

Starting with Intrexx 12.0.0: Class IServerBridgeRequest

$Response

An object for setting and reading the properties of an HTTP response.

Snippet

$Response

Class HttpResponseWrapper

Starting with Intrexx 12.0.0: Class HttpResponseWrapper

$RtCache

Runtime cache object containing information about applications, data groups, etc.

Snippet

$RtCache

Class VelocityRtCache

Starting with Intrexx 12.0.0: Class VelocityRtCache

$SaucMenu

Object for setting menu permissions in the Web CMS.

Snippet

$SaucMenu

Class SaucMenuPermission

Starting with Intrexx 12.0.0: Class SaucMenuPermission

$SearchUtil

Object for search queries.

Snippet

$SearchUtil

Class SearchUtil

Starting with Intrexx 12.0.0: Class SearchUtil

$Session

Access to the current user's session.

Snippet

$Session

Class Session

Starting with Intrexx 12.0.0: " " Class Session

$SettingsHelper

Object for reading settings.

Snippet

$SettingsHelper

Class VCSettingsHelper

Starting with Intrexx 12.0.0: Class VCSettingsHelper

$SharedState

Setting and reading user-defined values in the processing context. Read a value from the processing context:

Example 1

$SharedState.get("meineVariable")

Write a value to the processing context:

Example 2

$SharedState.putAt("meineVariable", "meinWert")

Snippet

$SharedState.get("<paramName>")
$SharedState.putAt("<paramName>", "<paramValue>")

Class SharedState

Starting with Intrexx 12.0.0: Class SharedState

$Sort

A helper object for sorting lists.

Snippet

$Sort

Class Sort

Starting with Intrexx 12.0.0: Class Sort

$SourcePage

Returns, for example, the GUID, application GUID, or RecID of the page that is sending the parameters.

Snippet

$SourcePage

Class VCSourcePage

Starting with Intrexx 12.0.0: Class VCSourcePage

$TextUtil

Helper object for various types of string manipulation.

Snippet

$TextUtil

Class TextUtil

Starting with Intrexx 12.0.0: Class TextUtil

$TickerMan

Object for accessing RSS providers.

Snippet

$TickerMan

Class TickerManager

Starting with Intrexx 12.0.0: Class TickerManager

$Unique

Object for generating unique variables.

Snippet

$Unique

Class Unique

Starting with Intrexx 12.0.0: " " Class Unique

$UrlBuilder

Object for creating URLs. Methods for generating URLs:

  • createBaseUrl

  • createAbsoluteBaseUrl

  • createAbsoluteRequestBaseDirectoryUrl

  • createWebSocketBaseUrl

  • parseUrl

All other methods for generating URLs are deprecated:

  • createDefaultUrl

  • createAbsoluteBaseDirectoryUrl

  • createRequestBaseDirectoryUrl

createBaseUrl

Always generates the relative base URL.

createAbsoluteBaseUrl

Generates the absolute base URL ending with a slash. For this purpose, the base URL configured in the portal is generally used.

If no base URL is configured, this URL is constructed from the server variables SCHEME, SERVER_NAME, and SERVER_PORT.

createAbsoluteRequestBaseDirectoryUrl

Creates an absolute URL. Its path portion is equal to the path from the request URI, excluding the document portion. The document part is the path segment farthest to the right that is not followed by a slash. The query string is discarded.

Example:

For the request https://example.org/dir1/dir2/foo.vm, $UrlBuilder.createAbsoluteRequestBaseDirectoryUrl($Request) returns https://example.org/dir1/dir2/.

For the request https://example.org/dir1/dir2/, $UrlBuilder.createAbsoluteRequestBaseDirectoryUrl($Request) returns https://example.org/dir1/dir2/.

parseUrl

Parses the given URL and returns a corresponding URL object.

Snippet

$UrlBuilder

Class UrlBuilder

Starting with Intrexx 12.0.0: Class UrlBuilder

$User

An object used to access information about the current user.

Snippet

$User

Class User

Starting with Intrexx 12.0.0: Class User

$VDiff

Object for displaying diffs of wiki articles.

Snippet

$VDiff

Class VDiff

Starting with Intrexx 12.0.0: Class VDiff

$VH

Object for creating ValueHolders.

Snippet

$VH

Class ValueHolderFactory

Starting with Intrexx 12.0.0: Class ValueHolderFactory

$VHHelper

Helper class for reading values from ValueHolders.

Snippet

$VHHelper

Class VCValueHolderHelper

Starting with Intrexx 12.0.0: Class VCValueHolderHelper

$VelocityContext

Snippet

$VelocityContext

Class VelocityUtil

Starting with Intrexx 12.0.0: Class VelocityUtil

$VelocityUtil

Snippet

$VelocityUtil

Class VelocityUtil

Starting with Intrexx 12.0.0: Class VelocityUtil

$Zebra

The Zebra callable makes it easier to alternate between outputting two strings.

Example

#set($zebra = $Zebra.createZebra("black", "white"))

$zebra.getStripe()
$zebra.getStripe()
$zebra.getStripe()
$zebra.getStripe()
$zebra.getSameStripe()

returns the following output

black
white
black
white
white

Snippet

$Zebra

Class Zebra

Class ZebraFactory

Starting with Intrexx 12.0.0: Class Zebra

Starting with Intrexx 12.0.0: Class ZebraFactory

Databases

Current Database Connection

Returns the current system connection to the database.

Snippet

$DbConnection

Access to External Data Connections

Access to an existing external data connection.

Snippet

$DbUtil.getConnection("connectionName")

All column names in a data group

Returns a list of the names of all columns in the data group with the specified GUID.

Snippet

#set($fields = $RtCache.getFields())
#set($columnNames = [])

#foreach($field in $fields)
	#if($field.getDataGroupGuid() == "<DG_GUID>")
		#set($bResult = $columnNames.add($field.getColumnName()))
	#end
#end

Prepared Statement with SELECT

Executes a SELECT query on a database table.

Snippet

#set($statement = $PreparedQuery.prepare($DbConnection, "SELECT <COLUMNS> FROM DATAGROUP('<DATAGROUP_GUID>') WHERE <CONDITION>"))
##$statement.setString(1, "Example text")
##$statement.setInt(2, 123)
##$statement.setBoolean(3, true)
#set($rs = $statement.executeQuery())
#foreach($element in $rs)
	##$element.getIntValue(1)
	##$element.getStringValue(2)
	##$element.getBooleanValue(3)
	##$element.getTimestampValue(4)
#end
$rs.close()
$statement.close()

Class DbPreparedStatement

Starting with Intrexx 12.0.0: Class DbPreparedStatement

Prepared Statement with INSERT

Executes an INSERT statement on a database table.

Snippet

#set($conn = $DbConnection)
#set($statement = $PreparedQuery.prepare($conn, "INSERT INTO DATAGROUP('<DATAGROUP_GUID>') (<COLUMNS>) VALUES ()"))
$DbUtil.transactionEnlistResource($conn)
##$statement.setString(1, "Example text")
##$statement.setInt(2, 123)
##$statement.setBoolean(3, true)
##$statement.setTimestamp(4, $DtUtil.utcNow())
$statement.executeUpdate()
$statement.close()

Class DbPreparedStatement

Starting with Intrexx 12.0.0: Class DbPreparedStatement

Prepared Statement with UPDATE

Executes an UPDATE statement on a database table.

Snippet

#set($l_conn = $DbConnection)
#set($statement = $PreparedQuery.prepare($l_conn, "UPDATE DATAGROUP('<DATAGROUP_GUID>') SET <COLUMN> = ? WHERE <CONDITION>"))
$DbUtil.transactionEnlistResource($l_conn)
##$statement.setString(1, "strValue")
##$statement.setInt(2, 123)
##$statement.setBoolean(3, true)
##$statement.setTimestamp(4, $DtUtil.utcNow())
$statement.executeUpdate()
$statement.close()

Class DbPreparedStatement

Starting with Intrexx 12.0.0: Class DbPreparedStatement

Prepared Statement with DELETE

Executes a DELETE statement on a database table.

Snippet

#set($conn = $DbConnection)
#set($statement = $PreparedQuery.prepare($conn, "DELETE FROM DATAGROUP('<DATAGROUP_GUID>') WHERE <CONDITION>"))
$DbUtil.transactionEnlistResource($conn)
##$statement.setString(1, "Example text")
##$statement.setInt(2, 123)
##$statement.setBoolean(3, true)
##$statement.setTimestamp(4, $DtUtil.utcNow())
$statement.executeUpdate()
$statement.close()

Class DbPreparedStatement

Starting with Intrexx 12.0.0: Class DbPreparedStatement

A single value from a prepared database query (with a fallback)

Reads a single value from a database query. If the result set is empty or zero, the value defined by `fallbackValue` is returned. If you want to specify the return data type more precisely, you can use typed method calls such as `executeAndGetScalarBooleanValue(...)`.

Snippet

#set($statement = $PreparedQuery.prepare($DbConnection, "SELECT <COLUMN> FROM DATAGROUP('<DATAGROUP_GUID>') WHERE <CONDITION>"))
##$statement.setString(1, "Example text")
##$statement.setInt(2, 123)
##$statement.setBoolean(3, true)
#set($result = $statement.executeAndGetScalarValue(<FALLBACK_VALUE>))
$statement.close()

Class DbPreparedStatement

Starting with Intrexx 12.0.0: Class DbPreparedStatement

Distinguish Between Database Types

Returns the database type of the system connection. The distinction can be made using the following identifiers:

  • Generic descriptor: $strType.contains("Standard")

  • PostgreSQL: $strType.contains("PostgreSQL")

  • Oracle in general, Oracle 10, Oracle 11:
    $strType.contains("Oracle")
    $strType.contains("Oracle10")
    $strType.contains("Oracle11")

  • DB2: $strType.contains("Db2")

  • Derby: $strType.contains("Derby")

  • MsSqlServer: $strType.contains("MsSqlServer")

Databases that are not supported as system databases:

  • AbacusPervasive: $strType.contains("AbacusPervasive")

  • Firebird: $strType.contains("Firebird")

  • HSQLDB: $strType.contains("HSQLDB")

  • Ingres: $strType.contains("Ingres")

  • MaxDB/SAP DB: $strType.contains("MaxDB")

  • Oracle 8, Oracle 9:
    $strType.contains("Oracle8")
    $strType.contains("Oracle9")

  • solidDB: $strType.contains("soliddb")

Snippet

#set($strType = $DbConnection.getDescriptor().getDatabaseType())

#if($strType.contains("<DATABASE_IDENTIFIER>"))
#end

Class DbPreparedStatement

Starting with Intrexx 12.0.0: Class DbPreparedStatement

Timestamps for System Values

This variable contains the timestamp of the current transaction and remains unchanged until the transaction is completed.

Snippet

$CURRENT_TIMESTAMP

Troubleshooting

Inspect the object

Inspects an object.

Snippet

$DEBUG.inspect()

Class ObjectInspector

Starting with Intrexx 12.0.0: Class ObjectInspector

Write information to the log file

Writes an INFO entry to the log file associated with the script's execution context.

Snippet

$DEBUG.info()

Class ObjectInspector

Starting with Intrexx 12.0.0: Class ObjectInspector

Write a warning to the log file

Writes a WARN entry to the log file associated with the script's execution context.

Snippet

$DEBUG.warn()

Class ObjectInspector

Starting with Intrexx 12.0.0: Class ObjectInspector

Write errors to the log file

Writes an ERROR entry to the log file associated with the script's execution context.

Snippet

$DEBUG.error()

Class ObjectInspector

Starting with Intrexx 12.0.0: Class ObjectInspector

Stopwatch - Start

Start the stopwatch.

Snippet

${DEBUG.builtinStopwatch.start()}

Class ObjectInspector

Starting with Intrexx 12.0.0: Class ObjectInspector

Stopwatch - Record Split Times

Records the split time from the stopwatch.

Snippet

${DEBUG.builtinStopwatch.stop()}

Class ObjectInspector

Starting with Intrexx 12.0.0: Class ObjectInspector

Stopwatch - Restart

Restart the stopwatch.

Snippet

${DEBUG.builtinStopwatch.restart()}

Class ObjectInspector

Starting with Intrexx 12.0.0: Class ObjectInspector

Portal Data

Portal Name

Returns the name of the current portal as a string.

Snippet

$Portal.getPortalName()

Class Portal

Starting with Intrexx 12.0.0: Class Portal

Time Zone

Returns the portal's default time zone.

Snippet

$Portal.getTimeZone()

Class Portal

Starting with Intrexx 12.0.0: Class Portal

Logged-in users

Returns a list of the GUIDs of the users currently logged in to the portal. The true/false parameter specifies whether anonymous users should be included in the output or not.

Example

Also displays anonymous users.

$Portal.getUsersOnline(true)

Snippet

$Portal.getUsersOnline(bIncludeAnonymousUsers)

Class Portal

Starting with Intrexx 12.0.0: Class Portal

Active Sessions

Returns the number of active sessions in the portal.

Snippet

$Portal.getActiveSessionCount()

Class Portal

Starting with Intrexx 12.0.0: Class Portal

Math

Add

Adds two integer, long, or double values.

Snippet

$Math.add($value1, $value2)

Class MathUtil

Starting with Intrexx 12.0.0: Class MathUtil

Subtraction

Subtracts two integer, long, or double values.

Snippet

$Math.sub($value1, $value2)

Class MathUtil

Starting with Intrexx 12.0.0: Class MathUtil

Multiply

Multiplies two integer, long, or double values.

Snippet

$Math.mult($value1, $value2)

Class MathUtil

Starting with Intrexx 12.0.0: Class MathUtil

Division

Divides two double values.

Snippet

$Math.div($value1, $value2)

Class MathUtil

Starting with Intrexx 12.0.0: Class MathUtil

Maximum

Calculates the maximum of two values.

Snippet

$Math.max($value1, $value2)

Class MathUtil

Starting with Intrexx 12.0.0: Class MathUtil

Minimum

Calculates the minimum of two values.

Snippet

$Math.min($value1, $value2)

Class MathUtil

Starting with Intrexx 12.0.0: Class MathUtil

Renderer

Current Date

Generates and formats the date according to the format set in the portal.

Snippet

$DefaultDateTimeRenderer.writeOutput($Response.getWriter(), $DtUtil.now($User.getTimeZone()))

Current date in a custom format

Generates and formats a date using a user-defined renderer. Output in this example (the last value indicates the calendar week): September 21, 2009, 12:14:35 p.m., 39

Snippet

#set($dateTimeRenderer = $RendererFactory.createDateTimeRendererWithParameters($RenderingContext, false, false, null, "dd.MM.yyyy HH.mm.ss CW", "", null))
$dateTimeRenderer.writeOutput($Response.getWriter(), $DtUtil.now($User.getTimeZone()))

Rendering Context

Access to the current rendering context.

Snippet

$RenderingContext

Class RenderingContext

Starting with Intrexx 12.0.0: Class RenderingContext

Date

Locate the date

Generates and formats the date according to the desired locale. The current locale must be available in the portal settings.

Snippet

$DtUtil.now($User.getTimeZone()).format($Locales.getLocale("en-US").getDateFormat())

Session

Session ID

Returns the ID of the current session.

Snippet

$Session.getId()

Class Session

Starting with Intrexx 12.0.0: " " Class Session

Read a session variable

Returns the value of a session variable.

Snippet

$Session.get(strSessionVar)

Class Session

Starting with Intrexx 12.0.0: " " Class Session

Write a session variable

Returns the value of a session variable.

Snippet

$Session.put(strSessionVar, strValue)

Class Session

Starting with Intrexx 12.0.0: " " Class Session

Escaping

$ dollar sign

Escape for the dollar sign

Snippet

${ESC.D}

Class EscapedCharacters

Starting with Intrexx 12.0.0: Class EscapedCharacters

# Number Sign

Escape character for license plate numbers

Snippet

${ESC.H}

Class EscapedCharacters

Starting with Intrexx 12.0.0: Class EscapedCharacters

" Quotation marks

Escape character for quotation marks

Snippet

${ESC.QUOT}

Class EscapedCharacters

Starting with Intrexx 12.0.0: Class EscapedCharacters

! Exclamation point

Escape for an exclamation point

Snippet

${ESC.EXCL}

Class EscapedCharacters

Starting with Intrexx 12.0.0: Class EscapedCharacters

\ Backslash

Escape for Backslash

Snippet

${ESC.BSL}

Class EscapedCharacters

Starting with Intrexx 12.0.0: Class EscapedCharacters

CR Car Return

Escape for CR Car Return

Snippet

${ESC.CR}

Class EscapedCharacters

Starting with Intrexx 12.0.0: Class EscapedCharacters

LF Line Feed

Escape for LF (line feed)

Snippet

${ESC.CR}

Class EscapedCharacters

Starting with Intrexx 12.0.0: Class EscapedCharacters

CRLF line break

Escape character for CRLF line break

Snippet

${ESC.CR}

Class EscapedCharacters

Starting with Intrexx 12.0.0: Class EscapedCharacters

TAB Tab key

Escape for TAB (Tab)

Snippet

${ESC.TAB}

Class EscapedCharacters

Starting with Intrexx 12.0.0: Class EscapedCharacters

TextUtil

Convert an array to a string

Converts an array to a string using the default separator | and 0 as the escape character. If you want to use different delimiters or escape characters, you can pass them in the function call.

Example

//Uses default separator and escape characters.
$TextUtil.arrayToString(p_array)
//Userdefined separator and escape characters.
$TextUtil.arrayToString(p_array, "$", "!")

Snippet

$TextUtil.arrayToString()

Class TextUtil

Starting with Intrexx 12.0.0: Class TextUtil

Convert a string to an array

Converts a string to an array if the string was previously created using arrayToString(p_myArray) from an array with the default separator | and 0 as the escape character.

Example

$TextUtil.stringToArray(p_string)

Snippet

$TextUtil.stringToArray()

Class TextUtil

Starting with Intrexx 12.0.0: Class TextUtil

Split string

Splits a string into an array using the specified character.

Example

$TextUtil.split(p_string, "$")

Snippet

$TextUtil.split(p_string, p_delimiter)

Class TextUtil

Starting with Intrexx 12.0.0: Class TextUtil

Parsing an Integer String

Parses an integer string into an integer.

Example

$TextUtil.parseInt("1234")

Snippet

$TextUtil.parseInt()

Class TextUtil

Starting with Intrexx 12.0.0: Class TextUtil

Parsing a Double String

Parses a double string into a double.

Example

$TextUtil.parseDouble("1234.56")

Snippet

$TextUtil.parseDouble()

Class TextUtil

Starting with Intrexx 12.0.0: Class TextUtil

ValueHolder

Create ValueHolder

Creates a ValueHolder from the passed-in object.

Snippet

$VH.getValueHolder($object)

Class ValueHolderFactory

Starting with Intrexx 12.0.0: Class ValueHolderFactory

Create a ValueHolder with the current date

Creates a ValueHolder with the current date.

Snippet

$VH.getNowValueHolder()

Class ValueHolderFactory

Starting with Intrexx 12.0.0: Class ValueHolderFactory

Versioning

Display an application's semantic version information

Example

#set ($version = $Portal.getApplicationVersionInformation("8D3B7A6462649864241A4534FD48364AF378218A").getCurrentVersion())
$version.getFormattedVersion()
$version.getDescriptions().get("de")
$version.getMajorVersion()
$version.getMinorVersion()
$version.getPatchVersion()
$version.getPreReleaseVersion()
$version.getCustomVersion()
$version.getDate()
$version.getMinProductVersion()
$version.getAdditionalRequirements().get("de")

Snippet

$Portal.getApplicationVersionInformation("")

Class Portal

Starting with Intrexx 12.0.0: Class Portal

Display Semantic Version Information for a Process

Example

#set ($version = $Portal.getWorkflowVersionInformation("B239068CECAA616964F71825C2CB9DB74DBB1BBA").getCurrentVersion())
$version.getFormattedVersion()
$version.getDescriptions().get("de")
$version.getMajorVersion()
$version.getMinorVersion()
$version.getPatchVersion()
$version.getPreReleaseVersion()
$version.getCustomVersion()
$version.getDate()
$version.getMinProductVersion()
$version.getAdditionalRequirements().get("de")

Snippet

$Portal.getWorkflowVersionInformation("")

Class Portal

Starting with Intrexx 12.0.0: Class Portal

Display Semantic Version Information for a Layout

Example

#set ($version = $Portal.getLayoutVersionInformation("Beispiellayout").getCurrentVersion())
$version.getFormattedVersion()
$version.getDescriptions().get("de")
$version.getMajorVersion()
$version.getMinorVersion()
$version.getPatchVersion()
$version.getPreReleaseVersion()
$version.getCustomVersion()
$version.getDate()
$version.getMinProductVersion()
$version.getAdditionalRequirements().get("de")

Snippet

$Portal.getLayoutVersionInformation("")

Class Portal

Starting with Intrexx 12.0.0: Class Portal

Connector for Microsoft Exchange

Current Exchange Connection

Returns the current Exchange connection.

Snippet

#set($conn = $ExchangeConnectionCallable.getConnection())

Class ExchangeConnectionCallable

Starting with Intrexx 12.0.0: Class ExchangeConnectionCallable

Folder Information

Information about an Exchange folder—in this example, the Inbox.

Snippet

#set($inbox = $ExchangeMailboxCallable.getInboxFolderHref($strMailboxName))
$ExchangeMailboxCallable.getFolderInfoByHref($inbox)

Class ExchangeMailboxCallable

Starting with Intrexx 12.0.0: Class ExchangeMailboxCallable

Mailbox name of the current Exchange user

Returns the mailbox name of the current Exchange user.

Snippet

#set($strMailboxName = $ExchangeUserMailboxCallable.getMailboxInfo().getMailboxName())

Class ExchangeUserMailboxInfo

Starting with Intrexx 12.0.0: Class ExchangeUserMailboxInfo

Account of the current Exchange user

Returns the account for the current Exchange connection.

Snippet

#set($account = $ExchangeUserMailboxCallable.getMailboxInfo().getUserAccount())

Class ExchangeAccount

Starting with Intrexx 12.0.0: Class ExchangeAccount

Set an out-of-office message

Write the text of the out-of-office message and set the status to "active." The text is formatted as both an internal and an external message.

Snippet

#set($strMessage = "Out of office till 2010/12/31")
$ExchangeMailboxCallable.setOutOfOfficeMessage($strMessage)
$ExchangeMailboxCallable.setOutOfOffice(true) 

Class ExchangeMailboxCallable

Starting with Intrexx 12.0.0: Class ExchangeMailboxCallable

Mark message as read

Marks a message with the specified ID as read. Example (e.g., on an email view page): $ExchangeMessageCallable.setMessageRead($DC.getRecId())

Snippet

$ExchangeMessageCallable.setMessageRead($messageId)

Class ExchangeMessageCallable

Starting with Intrexx 12.0.0: Class ExchangeMessageCallable

Attachments to a message

Returns the attachments for the message with the specified ID. Example (e.g., on an email view page): $ExchangeItemCallable.getAttachments($DC.getRecId())

Snippet

$ExchangeItemCallable.getAttachments($messageId)

Class ExchangeItemCallable

Starting with Intrexx 12.0.0: Class ExchangeItemCallable

Create an Exchange Appointment

Creates a new appointment for the current Exchange user.

Parameters:
$startDate - Start date of the appointment
$endDate - End date of the appointment
$subject - Event title
$body - Description of the appointment

If additional properties are defined using set() methods after the appointment has been created, you must save the appointment again using $appointment.save() to apply the changes.

Example

#set($appointment = $ExchangeAppointmentCallable.createNewAppointment($startDate, $endDate, $subject, $body))

$appointment.setLocation("Konferenzraum")
$appointment.save()

Snippet

#set($appointment = $ExchangeAppointmentCallable.createNewAppointment($startDate, $endDate, $subject, $body))

Class ExchangeAppointmentCallable

Starting with Intrexx 12.0.0: Class ExchangeAppointmentCallable

Create an Exchange Contact

Creates a new contact for the current Exchange user.

Parameters:
$lastName - Contact's last name
$firstName - Contact's first name
$mail - The contact's email address
$mailbox - The mailbox of the user for whom the contact is to be created. If zero is specified, the current user's mailbox is used.

If additional properties are defined using set() methods after the contact has been created, you must save the contact again using $contact.save() to apply the changes.

Example

#set($contact = $ExchangeContactCallable.createNewContact($lastName, $firstName, $mail, $mailbox))

$contact.setJobTitle("Developer")
$contact.save()

Snippet

#set($contact = $ExchangeContactCallable.createNewContact($lastName, $firstName, $mail, $mailbox))

Class ExchangeContactCallable

Starting with Intrexx 12.0.0: Class ExchangeContactCallable

Generate and Send Exchange Emails

Creates a new email account for the current Exchange user.

Parameters:
$from - Sender's address
$to - Recipient's address
$subject - Subject
$body - Message text

If additional properties are defined using set() methods after the email has been created, you must save the draft again using $message.save() to apply the changes.

Example

#set($message = $ExchangeMessageCallable.createNewDraft(strSender, strRecipient, strSubject, strBody))
$message.setCc("cc_recipient@example.org")
$message.save()

$message.send()

Snippet

#set($message = $ExchangeMessageCallable.createNewDraft(strSender, strRecipient, strSubject, strBody))

Class ExchangeMessageCallable

Starting with Intrexx 12.0.0: Class ExchangeMessageCallable

Create an Exchange Note

Creates a new note for the current Exchange user.

Parameters:
$text - Note text
$mailBox - Name of the mailbox in which the note should be created. If zero is specified, the current user's mailbox is used.

Example

#set($note = $ExchangeNoteCallable.createNewNote("My note", null))

Snippet

#set($note = ExchangeNoteCallable.createNewNote($text, $mailbox))

Class ExchangeNoteCallable

Starting with Intrexx 12.0.0: Class ExchangeNoteCallable

Create an Exchange task

Creates a new task for the current Exchange user.

Parameters:
$start - Task start date
$due - Assignment due date
$subject - Assignment Title
$mailBox - Name of the mailbox in which the task is to be created. If zero is specified, the current user's mailbox is used.

Example

#set($task = $ExchangeTaskCallable.createNewTask(${cursor}dtStart, dtDue, "Task subject", null))

$task.setPercentComplete(25.0)
$task.save()

Snippet

#set($task = $ExchangeTaskCallable.createNewTask(dtStart, dtDue, "Task subject", null))

Class ExchangeTaskCallable

Starting with Intrexx 12.0.0: Class ExchangeTaskCallable

If Else

Basic structure for an "if-else" statement.

Snippet

#if(condition1)
	##code for condition1
#elseif(condition2)
	##code for condition2
#else
	##code if no condition matches
#end

Velocity Overview

Starting with Intrexx 12.0.0: Velocity Overview

For-each loop

The basic structure of a foreach loop.

Snippet

#foreach($element in )
	
#end

Velocity Overview

Starting with Intrexx 12.0.0: Velocity Overview

Define a variable

Example

#set( $id = 1)
#set( $userName = "Administrator")

Snippet

#set($variable = aValue)

Velocity Overview

Starting with Intrexx 12.0.0: Velocity Overview

Output a variable in local format

Displays a variable in the portal's local format. The variable must be stored in a value holder. The following types can be specified for RENDERING_TYPE: integer, datetime, date, time, currency, number, boolean, author.

Example

#set($vhValue = $VH.getValueHolder(1))
#writeVH($vhValue, "currency", true, false, false)

Snippet

#set($vhValue = $VH.getValueHolder($object))
#writeVH($vhValue, "<RENDERING_TYPE>", true, false, false)

Velocity Overview

Starting with Intrexx 12.0.0: Velocity Overview

Read Request Parameters

Reading a request parameter.

Snippet

$!Request.get("rq_param")

Class IServerBridgeRequest

Starting with Intrexx 12.0.0: Class IServerBridgeRequest

Write Request Parameters

Writing a request parameter.

Snippet

$Request.put("rq_param", "strValue")

Class IServerBridgeRequest

Starting with Intrexx 12.0.0: Class IServerBridgeRequest

All data groups in an application

Returns the names of all data groups in the application with the specified GUID.

Snippet

#set($datagroups = $RtCache.getDataGroups($RtCache.filter.dataGroup.getByApplication(<GUID-der-Applikation>)))
#foreach($datagroup in $datagroups)
	Name: $datagroup.getName()
#end

Class VelocityRtCache

Starting with Intrexx 12.0.0: Class VelocityRtCache

Dynamically Determining a Table Name Using Sysident

To determine the table name using sysident, the sysident expert attribute must be defined in the data group properties. When entering the Sysident value, be sure to use the correct case.

Example

$RtCache.getFirstDataGroup($RtCache.filter.dataGroup.getBySysIdent("4B73F01B5F97199C578431966703239ED1AD8397", "mein-sysident")).getTableName()

Snippet

$RtCache.getFirstDataGroup($RtCache.filter.dataGroup.getBySysIdent("<GUID-der-Applikation>", "<Sysident-Wert>)).getTableName()

Class VelocityRtCache

Starting with Intrexx 12.0.0: Class VelocityRtCache

Current date with the current user's time zone

Generates a current date based on the current user's time zone.

Snippet

$DtUtil.now($User.getTimeZone())

Class CalendarAwareDate

Starting with Intrexx 12.0.0: Class CalendarAwareDate

Structure of a JSON Response

Generates a JSON response.

Snippet

## This is necessary: Prevent the response from linebreaks, unwanted outputs, etc.
$Response.setIgnoreWrite(true)

## in here you can write your Velocity-Code without effecting the response accidentally
## e.g. set a variable
#set($myVar = "Hello client!")

## This may help you: Using a java.util.Map to go on easy with JSON-formatting later.
#set($map = $CollectionFactory.createMap())
## Add everything you need into the map with a reliable key.
$map.put("myJSONAnswer", $myVar)

## This is necessary: Format the response, so the server delivers JSON.
$Response.setHeader("Cache-Control", "no-cache")
$Response.setHeader("Content-Type", "application/json;charset=UTF-8")

## Format the Map to be escaped for the JSON-String.
$Response.setIgnoreWrite(false)$JSON.toJSONString($map)

Class JSONUtil

Starting with Intrexx 12.0.0: Class JSONUtil

Generate a GUID

Generates a new GUID

Snippet

$Unique.newGuid()

Class Unique

Starting with Intrexx 12.0.0: " " Class Unique

Determine the portal's start time and uptime

Snippet

$Portal.getUptimeDuration()
$Portal.getUptimeMillis()
$Portal.getStartTime()

Class Portal

Starting with Intrexx 12.0.0: Determine the portal's startup time and uptime

Snippet

$Portal.getUptimeDuration()
$Portal.getUptimeMillis()
$Portal.getStartTime()

Class Portal