How to restrict the user to enter limited characters in Sage ERP X3

By | February 28, 2015

You may come across a situation where you would like to restrict the user to enter limited characters in a field. Sage Enterprise Management has a special feature in which you can validate the fields with the help of “Chgfmt” keyword.

Chgfmt: It is used to change the format of the mask field. It is also used to display or hide any fields.

Syntax:

Chgfmt [class] field with expr_c

Parameter details:
class    :  name of the mask
field     :  name of the field
expr_c : expression to hide a field.

Kindly refer to the below snippet of code for better understanding

img1

In the below screen, the user cannot move to next step until he enters proper value.

img2

Here’s some sample code for chgfmt.

Chgfmt [M:XMT0]SCEAXX With “K:8A”—To allow only 8 Upper case characters
Chgfmt [M:XMT0]SCEAXX With “K:3A” — To allow only 3 Upper case characters
Chgfmt [M:XMT0]SCEAXX With “-K:3A” — To hide the field
Chgfmt [M:XMT0]SCEAXX With “K:2X5a”—To allow only 2 numbers and 5 lower case charactors
Chgfmt [M:XMT0]SCEAXX With “K:250a”– To allow only 250 Lower case characters
Chgfmt [M:XMT0]SCEAXX With “K:250A”– To allow only 250 Upper case characters
Chgfmt [M:XMT0]SCEAXX With “3A2X#”—To Allow 3 uppercase letters, 2 any characters, followed by a figure.

About Us
Greytrix – a globally recognized Premier Sage Gold Development Partner is a one-stop solution provider for Sage ERP and Sage CRM needs. Being recognized and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development and implementation expertise.

Greytrix caters to a wide range of Sage Enterprise Management (Sage X3) offerings – a Sage Business Cloud Solution. Our unique GUMU™ integrations include Sage Enterprise Management (Sage X3) for Sage CRMSalesforce.com and Magento eCommerce along with Implementation and Technical Support worldwide for Sage Enterprise Management (Sage X3). Currently we are Sage Enterprise Management Implementation Partner in East Africa, Middles East, Australia, Asia. We also offer best-in-class Sage X3 customization and development services, integrated applications such as POS | WMS | Payment Gateway | Shipping System | Business Intelligence | eCommerce and have developed add-ons such as Catch – Weight  and Letter of Credit for Sage Enterprise Management to Sage business partners, end users and Sage PSG worldwide.

Greytrix is a recognized Sage Rockstar ISV Partner for GUMU™ Sage Enterprise Management – Sage CRM integration also listed on Sage Marketplace; GUMU™ integration for Sage Enterprise Management – Salesforce is a 5-star app listed on Salesforce AppExchange.

For more information on Sage X3 Integration and Services, please contact us at x3@greytrix.com. We will be glad to assist you.