FORMULA LANGUAGE


@Text
Example

Converts any value to a text string.

Syntax

@Text( value ; format-string )

Parameters

value


Note Conversion of rich text is new with Release 6.

format-string


Return value

textValue


@Text with time-date components

There are four separate categories of time-date, format-string components. You can include up to four components, but only one from each category.
SymbolMeaning
D0Month, day and year
D1Month and day, year if it is not the current year
D2Month and day
D3Month and year
T0Hour, minute, and second
T1Hour and minute
Z0Always convert time to this zone
Z1Display zone only when it is not this zone
Z2Display zone always
S0Date only
S1Time only
S2Date and time
S3Date, time, Today, or Yesterday
Sx Use when you cannot predict the exact format of the value being passed, but you know that it is either a time, a date, or both.

@Text with number values

For number values, compose a format-string by combining any of the following components into a string.
SymbolMeaning
GGeneral format (significant digits only)
FFixed format (set number of decimal places)
SScientific format (E notation)
CCurrency format (two decimal places)
,Punctuated at thousands (using U.S. format)
%Percentage format
()Parentheses around negative numbers
numberNumber of digits of precision

Usage

If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.

Once a number value is converted to text, you will not be able to use the number for arithmetic calculations.

Rich text conversion loses attachments and all formatting except tabs and spaces. When rich text is converted in a document, the document must be saved before the conversion becomes visible.

Rich text conversion does not work in column formulas. Use @Abstract to convert the contents of a rich text field to plain text. Then reference the plain text field in the view. For example, if you add the following code to a hidden computed field called plainText, you can then set the default value of the view column to "plainText" to display the contents of the RTField:

@Abstract([TextOnly];15360;"";"RTField")

Use caution if using @Text to convert numbers or dates in a column. In databases hosted by a server, the numbers and dates always display using the format settings of the hosting server's operating system. Also, if the date or number format settings of either the client accessing the database or server hosting the database change, you may need to entirely rebuild the view.

Language cross-reference

CStr function of LotusScript language

GetFormattedText method in LotusScript NotesRichTextItem class

getFormattedText method in Java RichTextItem class

Example
See Also