FORMAT keyword

Applies To

This keyword is a substitution keyword, and is valid in any field that can contain substitution keywords.

Description

This keyword is supported and resolved wherever the STRINGS( ) keyword is supported and resolved; however, FORMAT ( ) also can look up a translated value and then perform positional substitution of other, potentially interpreted, values.

Syntax

FORMAT( stringname, parameter1, ... parameterN)

Remarks

When WinStudio interprets the field, it replaces the keyword and its parameters with the value of the named string, if the string exists. Any positional parameters in the string value (%1, %2, etc.) are replaced by the corresponding parameter values.

Example

A string mEventHandlerPrompt has an English value of "Do you approve the purchase order for %1, with a total price of %2?" Parameters %1 and %2 must draw from the properties PoNum and DerTotalPrice, so the FORMAT keyword is used like this:

FORMAT( mEventHandlerPrompt, P(PoNum), P(DerTotalPrice) )

The value displayed might be:

Do you approve the purchase order for P123456789, with a total price of 12345.67?

Related topics