Skip to content

Zero Suppression with Masks

Masks now support zero-suppression for numbers, dates, and strings. Zero-suppression is enabled by inserting a "Z" as the first character of the form mask. The "Z" must be the first character and it must be capitalized. Note that suppression is only applied to forms when they do not have the focus.

Numeric and Currency Masks

When applied to numeric and currency masks, the form will be cleared if its value is zero.

set form_datatype to mask_currency_window
set form_mask to "Z$,#######.00;($,#######0.00)"

Date Masks

When applied to a date mask, the form will be cleared if its value is zero (previously the form would appear as " / / ").

set form_datatype to mask_date_window
set form_mask to "ZM/d/yyyy"

String Masks

When applied to a string mask, the form is cleared if the value is blank. Technically, this is not zero suppression but blank suppression.

set form_datatype to mask_window
set form_mask to "Z(###)###-####"

Zero Suppression in Data Dictionaries

The zero suppress option in the DataDictionary class (DD_Zero_Suppress) now works with DataFlex. Normally, zero-suppress will be selected as a field option from Database Builder. When applied, all mask forms that use that field will be zero suppressed. Zero suppression can only be applied to windows that have masks. By default, the Database Builder sets mask types for dates and numbers. This can be used to zero suppress dates and blank suppress strings as well as zero suppressing numbers.

When the zero suppress is selected in data dictionaries, any DEO using that field will insert a "Z" in front of its mask. You can also apply zero-suppression to a DataDictionary field by creating a field mask with a "Z" as the first character. This is not recommended. Use the zero-suppress checkbox instead.

Zero suppression in DDOs is dynamic. If you change a field’s zero-suppression attribute in a DDO, all DEOs using that field will be changed as needed.