How Do I Create a Formatting Pattern for a Column?
This Lesson describes how to build a format pattern usable in the Data Grid Helper Plugin for formatting numbers.
What Are the Symbols supported by the Pattern?
You can build patterns by using:
spaces Separator replaced by the content of the DGH's thousands separator property.
# Digit placeholder. This code does not display extra zeros.
0 Digit placeholder. This code pads the value with zeros to fill the format.
. Decimal number replaced by the content of the DGH's decimal separator property.
$ - + / ( )
[color] Where color is any color name supported by the LiveCode syntax.
How Can I define Patterns for Positive, Negative or Zero Values?
A Pattern for a column can be separated in three patterns items:
- the first for Positive Numbers
- the second for Negative Numbers
- the last for Zero Values
Note that for having an empty result for Zero Values, you need to input a space in the last pattern item.
The pattern delimiter is the comma.
William Moseid
Excellent!