Input Masks in Acumatica

By | December 11, 2023

In the world of ERP systems, Acumatica is popular and well known for its flexibility and adaptability. One exceptional feature of Acumatica is its customization, allowing organizations to tailor the system to their precise needs. Input masks provide developers with a powerful tool to control and format user input, ensuring data accuracy and enhancing the overall user experience.

Understanding Input Masks:

An input mask is a string of characters that defines the format of permissible user input. Developers can apply input masks to various fields, restricting input to a predefined pattern. This not only ensures that data conforms to a specific structure but also simplifies data entry for users.

Key Features and Benefits:

1. Format Consistency:

PXStringAttribute: This attribute allows developers to define input masks for string fields. For example, a mask for a contact number field might ensure that users enter numbers in the format (XXX) XXX-XXXX.

 [PXString(InputMask = “(###) ###-####”)]

2. Improved Data Entry:

By guiding users to input data in a consistent format, input masks reduce errors and enhance the overall accuracy of data.

3. Enhanced User Experience:

The use of input masks provides a user-friendly experience. Users can quickly understand the expected format for data entry.

4. Adaptability to Different Scenarios:

Developers can customize input masks based on the specific requirements of different fields. For instance, a date field might have a mask that enforces the format MM/DD/YYYY.

[PXDate(InputMask = “MM/dd/yyyy”)]

5. Dynamic Input Masks:

Input masks can be dynamic, changing based on certain conditions. This flexibility enables developers to cater to various scenarios within the same application.

[PXString(typeof(Search<DacName.fieldName>), InputMask = “CUST-{0:00000}”)]

The default value for the key fields of the input mask is ‘>aaaaaa’. The control characters used are as follows:

  • ‘>’: Converts the following characters to uppercase.
  • ‘<‘: Converts the following characters to lowercase.
  • ‘&’, ‘C’: Accepts any character or a space.
  • ‘A’, ‘a’: Accepts a letter or digit.
  • ‘L’, ‘?’: Accepts a letter.
  • ‘#’, ‘0’, ‘9’: Accepts a digit.

This input mask configuration is designed to format and validate input according to the specified rules for uppercase/lowercase letters and digits.

Greytrix, with its 24+ years of expertise as the Sage Development partner, extends its mastery to bring Acumatica to modern businesses. Greytrix offers complete end-to-end professional services for Acumatica, ranging from development, support, technical assistance, consulting, and system integrations.