Altova StyleVision 2025 Basic Edition

Predefined Value Formatting Strings

Home Prev Top Next

Any (content) placeholder, input field, or Auto-Calculation which is of a numeric, date, time, dateTime or duration datatype can be assigned a custom format with the Value Formatting dialog. In the Value Formatting dialog, you can either create a format directly or select from a drop-down list of predefined formats.

 

The predefined formats that are available in the dropdown list are of two types:

 

Predefined formats that have been delivered with StyleVision, and

Predefined formats that the user creates with the Predefined Value Formatting Strings command (this command). When a user creates predefined value formats, these are created for the currently open SPS file—not for the entire application. After the user creates predefined value formats, the SPS file must be saved in order for the formats to be available when the file is next opened.

 

Creating a predefined value formatting string

A predefined value format string is specific to a datatype. To create a predefined value formatting string, do the following:

 

1.Click Properties | Predefined Value Formatting Strings. The following dialog appears:

 

dlg_predefined_formats

 

2.Select a datatype from the drop-down list in the combo box, and then click the Append or Insert icon as required. This pops up the Edit Format String dialog:

 

dlg_edit_format_string_1

 

If you click the down arrow of the combo box, a drop-down list with the StyleVision-supplied predefined formats for that datatype is displayed (shown in the screenshot below).

 

dlg_edit_format_string

 

You can either select a format from the list and modify it, or you can enter a format directly into the input field. The syntax for defining a format is explained in the section, Value Formatting. If you need help with the syntax, use the Insert Field and Field Options buttons.

3.After you have defined a format, click OK and save the SPS file. The formatting string is added to the list of predefined formats for that datatype, and it will appear as an option in the Value Formatting dialog (of the current SPS file) when the selected element is of the corresponding datatype.

 

Note the following points:

 

You can add as many custom format strings for different datatypes as you want.

The sequential order of format strings in the Predefined Format Strings dialog determines the order in which these format strings appear in the Value Formatting dialog. The customized format strings appear above the supplied predefined formats.

To edit a custom format string, double-click the entry in the Predefined Format Strings dialog.

To delete a custom format string, select it, and click the Delete icon in the Predefined Value Formatting Strings dialog.  

 

© 2018-2024 Altova GmbH