Linking fields to format fields

The formatting displayed for certain string and currency fields in Microsoft Dynamics GP is based on the value of an integer field called a format field. A format field is designated by choosing Link Format Selector from the Tools menu while the layout window is active. The Modifier will switch to format linking mode, allowing you to link the string or currency field to the format field. The Modifier will stay in this mode until you choose Link Format Selector from the Tools menu again.

While the Modifier is in format linking mode, you can link fields to format fields by dragging from a currency or string field to the integer field you want to link it to. A flashing border around the integer field will indicate that the link was successful. The value of the integer field indicates which format string should be used for the currency or string field. The integer field can be an invisible field or a field such as a drop-down list, allowing the user to specify the format.

Formatting currency fields

The possible formats for currency fields and the integer value associated with them are shown in the following table.

[spacer]

Integer

Format

Integer

Format

0

Control panel defaults

10

$1,234.567

1

1,234

11

$1,234.5678

2

1,234.5

12

$1,234.56789

3

1,234.56

13

1,234%

4

1,234.567

14

1,234.5%

5

1,234.5678

15

1,234.56%

6

1,234.56789

16

1,234.567%

7

$1,234.

17

1,234.5678%

8

$1,234.5

18

1,234.56789%

9

$1,234.56

 

 


The integer value used to indicate the format used can be stored in a table along with the currency field being formatted. When the record is retrieved from the table, the currency field will display as it did when the record was saved. The format field can also be used for a report, allowing the currency field to appear in the report as it did when it was saved in the table.

Microsoft Dynamics GP can define its own formats, in addition to those shown in the previous table. This capability is used to define currency format information for multicurrency support.


Formatting string fields

For string fields, the integer value indicating the format to use corresponds to the position of the format string in the Format Definition window.

The following example describes a Part Number field that has three different format strings. The user selects the format to apply by selecting the corresponding format in a drop-down list linked to the Part Number field. The three format strings for the Part Number field, entered in the Format Definition window, are shown in the following illustration.

[spacer]

The drop-down list is set to the following value (integer 3), corresponding to the third format string:

[spacer]

The Part Number field will display the following format:

[spacer]

Using format fields

Unless you are creating your own fields, the presence of a format field typically won’t affect modifications you make to a window. You need to watch for fields that have their LinkedFormat property set. If you make modifications to these fields, be sure the LinkedFormat property remains unchanged.

Another situation to be aware of occurs when Microsoft Dynamics GP uses a format field to apply multicurrency formatting to currency fields in transaction entry windows. All of the currency fields in the window will be linked to a hidden format field typically named Currency Index. The value of this hidden field indicates what multicurrency formatting will be applied to all of the currency fields linked to it. If you add currency fields to the window, be sure to link those fields to the same format selector field that Microsoft Dynamics GP uses.

[spacer]


Documentation Feedback