
User Defined / Custom JavaScript Validation
You can use a custom JavaScript method to validate any field
when it is displayed in Edit mode and the Editable setting is true.
The emxUIFormHandler.js file contains these methods
that can be used for validation:
- emxFormGetValue: Returns an object that holds the actual/display
values for both the modified and old values of the field.
- emxFormSetValue: Sets the displayed field value
and actual field value.
- emxFormGetFieldHTMLDOM: Gets the HTML DOM object
for a field.
- emxFormDisableField: Enables or disables a field
(gray or ungray).
- emxFormIsFieldEditable: Returns a boolean value
indicating if the field can be edited.
- emxFormSetFieldEditable: Sends true to make the
field editable; or false to make the field non-editable.
- emxFormReloadField: Reloads the specified field.
Refer to the JavaDocs for details on these functions.
Framework Validation FileENOVIA Business Process Services
The ENOVIA Business Process Services validation file is defined using the following property:
eServiceSuiteFramework.UIForm.ValidationFile = scripts/
emxUIFormValidation.js
Or for backward compatibility:
emxFramework.UIForm.ValidationFile = scripts/
emxUIFormValidation.js
emxUIFormValidation.js is common and is available to all
the web form pages. It is distributed with ENOVIA Business Process Services. Any ENOVIA Business Process Services
upgrade overwrites it. Currently, the file is empty and serves as a placeholder
for future validation methods that may be needed for all applications.
Do not change this file since it will get overwritten in future upgrades.
To add any common custom files to be available across all web forms
used by different applications, add the custom files to this property.
For example:
eServiceSuiteFramework.UIForm.ValidationFile =scripts/
emxUIFormValidation.js, \
scripts/abcCustomValidation1.js
In this case scripts/abcCustomValidation1.js will not
get overwritten by ENOVIA Business Process Services upgrades.
Application-Specific Validation File
You can define application-specific custom validation files using the
property based on the Registered Suite (suite key) in emxSystem.properties.
For example, if the Registered Suite is EngineeringCentral, the corresponding
key is defined in the system property file as shown below:
EngineeringCentral.UIForm.ValidationFile = scripts/
emxEngrValidation.js
Or:
eServiceSuiteEngineeringCentral.UIForm.ValidationFile =
scripts/emxEngrValidation.js
You can assign one or more files separated by a comma
as the property value to define multiple files.