Substitution formula reference

Substitution formulas are functions which are calculated at runtime and return a text string.  

 

Substitution Formulas Library

Note:

All the Substitution formula are case insensitive.

 

Formula syntax

Result

Output example (with culture EN-US)

@user

returns the user name of the currently logged user.

Susan Mayer

@username

synonym of @user

Susan Mayer

@capsule

returns the current capsule name

Budget 2010

@screen

returns the current screen name

Forecast

@database

returns the name of the current database

Delta

@DTB

synonym of @database

Delta

@Selection

returns the current selection: the name of the entities on which a selection has been made followed by the list of selected members. @Selection in block headers will show block references too. Please refer to Section below.

Year: 2004, 2005

@entity_name

returns the list of selected (in the Select or Pager Object) members of the specified entity. Note that the entity name is case sensitive. For example, @Month returns the list of selected members of the Month entity.

24 / 60

@time

The string returned by the @time is culture-sensitive. For example, for the en-US culture, the output is "h:mm:ss tt"; for the de-DE culture, it is "HH:mm:ss"; for the ja-JP culture, it is "H:mm:ss".

7:55:30 AM

@time12

returns the current time in format "HH:mm". Is culture-sensitive.

07:55

@time24

returns the current time in format "HH:mm tt". Is culture-sensitive.

07:55 AM

@timelong

returns the current time in format ""HH:mm:ss". Is culture-invariant.

7:55:30 AM

@date

The string returned by the @date is culture-sensitive. For example, for the en-US culture, the output is "M/d/yyyy"; for the de-DE culture, it is "dd.MM.yyyy"; for the ja-JP culture, it is "yyyy/M/d".

7/19/2010

@datelong

returns the current date in format ""dddd, dd MMMM yyyy". Is culture-sensitive.

Monday, July 19, 2010

@dateextendend

returns the current date in format "ddd, MMMM dd, yyyy". Is culture-sensitive.

Mon, July 19, 2010

@dateday

returns the current date in format "MM/dd/yyyy". Is culture-sensitive.

7/19/2010

@datemonth

returns the current date in format "MMMM dd". Is culture-sensitive.

July 19

@dateyear

returns the current date in format "yyyy MMMM". Is culture-sensitive.

July, 2010

@datetime

returns the current date in format "MM/dd/yyyy HH:mm:ss". Is culture-sensitive.

7/19/2010 7:55:30 AM

 

Substitution formulas can be used in the Capsules environment by applying the function to some objects properties, such as the caption of a Label object or in definition of a the database security profile or in the print template.

 

 

@Selection

The @Selection Script is definitively the most popular substitution formal and includes several  parameters to customize the  final output. Such Script can be used in any Label or Button Caption, Title or Block Heading.

 

@Selection_Ex

It works as the @Selection but the output is not narrowed to 10 items : by default is unlimited.

 

@Selection_Ex(Layout="Layout_Title")

It shows the Layout Select. Attention! it doesn’t combine the Screen Selection with the Layout Selection.

Layout = " " is the default value

 

@Selection_Ex(Layout=" Layout_Title ", Block="Block_Heading")

It shows the Block Select. Attention! it doesn’t combine the Screen Selection neither the Layout Selection with the Block Selection

Block = " " is the default value

 

@Selection_Ex(Display="Code")

It shows the Code only of the Selected Items. Available Values are: Desc, Code, CodeDesc, Default.

Display=”Default” is the default value

 

@Selection_Ex(Interval="Range_Item")

It defines which elements of the Selected Item-Set are showed. Available Values are: First, Last, Range, All

Interval = "All" is the default value

 

@Selection_Ex(Limit="n")

If the number (m) of the Selected Items is greater than n (m>n) it doesn’t show the item codes and/or description but m/M where M is the number of available items for such Entity. If m<=n it works as usual.

Limit=MaxValue is the default value (no limitation)

 

@Selection_Ex(Entity="Entity_Name")

It doesn’t show the Entity Name that precedes the Selected Item List

Entity = " " is the default value

 

 

NOTES

When the @Selection_Ex Script is used in a Layout Title or Block Heading the Layout and Block parameter must be omitted

Two or more @Selection_Ex Scripts can’t be combined nor concatenated in the same Script

The @Selection_Ex Script can’t have as a Parameter another @Selection_Ex Script : i.e. you can’t have a @Selection_Ex(Layout="Layout_Title") if in the Layout Title a @Selection_Ex Script has been created